Technical Architect, Acquia
D.O: adam.weingarten
github: aweingarten
linkedin: adam.weingarten
Technical Architect, Acquia
D.O: mikemadison
github: mikemadison13
linkedin: mikemadison
Next-generation digital experiences
Beyond conventional browser
Content Management
Working with external data
Data Transmission
Device Management
Security
Support
Case Studies
Great DX. Horrible UX.
Even in a headless world Drupal has a place
Makes it easy to author and edit
Has views to find the right content
Services to spit it out
Content Modeling
Access Controls & Permissions
Revisioning
Translations
Reproducing this elsewhere is expensive
Lines: Red, Blue, Yellow, Green
Line Direction: Shady Grove or Glenmont
Stations: Metro Center, Smithsonian, Farragut North
Platforms: Single platform can service Multiple lines.
Build your own API
Drupal isn't the source of all things.
It can still help process outside data.
Pinterest, Facebook, Twitter
Remember that Drupal content model?
We can use it to to process that data!
Say we have an arrival feed.
Can process updates for specific signs
Let the signs know that something has changed
Start with a Drush command
Store the credentials in Drupal
Sprinkle in some caching to enforce rate limits
Parse and normalize data
Use cron to start the script on a regular interval (e.g. 1 minute)
Pass iterations as a Drush parameter into your command
Write a loop within the script
Repeat
This assumes that your script can run very fast
Optimize and cache accordingly
Getting information from Drupal to your device
High Traffic
Load on devices
Load on servers
Can mimic DDOS
Send data to devices from multiple APIs in "real" time
!@$!%@# Caching
Must stay "current" over time
Limited or no user interactivity
(can't constantly reload)
Long connection time
Nearly instantaneous communication
Can be shared between devices
Bi-directional
(pretty critical for a lot of devices getting a lot of data)
N number of Devices each subscribe to 1 or more "topics"
Drupal subscribes to one or more data sources
Drupal pushes appropriate data to appropriate topic(s)
IOT pushes data to connected device(s)
...now we have a new problem
Data
Content
That case study only works if Drupal knows about the Devices too
Which device cares about what data?
What format should the data be provided in?
How do you make sure that only your devices are accessing the data?
Device Location: DC Metro
What direction do trains travel?
What tracks does this screen cover?
What platform is the device on?
What station is the platform in?
What routes run through that platform and station?
Entity references provide context
Metadata can be used in reports
UX bonus: re-use this structure for message / data placement
Fully boostrapping Drupal during parsing == slow
Cache!
What size screen?
What IP address?
What direction is the screen facing?
What language should the device display?
Whitelist your system
Make sure your service requires authentication from devices
Require TFA for user access
(let's talk more about this)
You just created a real device in the real world!
And everyone wants to hack it
Embedded devices have poor security track-records
Often ship with default passwords.
Restrict physical access
Make sure that the vendor releases patches in a timely manner
Stay on top of firmware updates
Plan for upgrades when any installed software has a published vulnerability
Even a TV can be hacked
Guard the back door!!!!
MUST be as secure (or more so) than the rest of the stack
Validate your data
Audit your data
No one wants a man in the middle attack
Great way to vandalize your sign
It's a go live blocker
In case you were wondering: they are.
Something goes wrong on a webpage you reload
Don't give it a second thought
When a sign shows a blue screen of death people notice
Graceful Degradation
Good starting point for a custom extension
Troubleshooting a complex stack with API integrations is hard
Devices use Angular to poll various APIs in real time (directly)
You didn't load test any of your web servers before launch
You add 20 more screens in production
How do you troubleshoot?
Did a server powering one of the APIs crash?
Did the web server crash?
Make sure support knows what those APIs are.
Make sure support knows the warnings signs and symptoms of problems.
Who owns which API
Who you gonna call
Figure this out before something bad happens
(that includes testing before hand)
Mirror the production hardware
Including any dependent APIs
Your source APIs may not have as robust of a workflow as your main site
Make sure the owners of those systems know not to make changes without notifying your dev team
1: 10k+ devices, mostly static data
2: < 5k devices, real-time data
Devices: Video Walls, TVs, Tablets, Phones
Content: Media for Promotion & Marketing
Store locations are distributed geographically
Tens of thousands of devices
Significant variance in display sizes
Drupal manages all content
Drupal manages all devices
Google GCM Push Model
Offline content playback
Central place to create content and manage devices
Reuse content and/or custom content per device
Internet connectivity isn't constantly required
System is massively scalable
UX for content managers
Devices: Digital Screens
Content: Arrival data, messaging / emergency communication
Real-time data across thousands of devices
Internet & websocket connectivity
Error handling & recovery
On-demand messaging
Performance
Arrivals (and other) data parsed by Drupal
Drupal content for messaging
Amazon IOT Websocket Push Model
React front end
Inventory of Drupal assets to speed parsing
Right sized targeted messaging
Arrival data changes on screen within 5-8 seconds
System is massively scalable
UX for content managers
Why Drupal is a good idea for signs!
A few techniques to use
A couple of case studies on how we used them
DA asked us to include this.