4. Internet of Things
Internet of things usually refers just to all things gaining
internet access, from smartwatches to toasters
In this presentation, the definition of the Internet of
Things is based on new devices currently increasingly
gaining internet connections
home automation, energy equipment, wearables etc.
10. What does Drupal offer?
Drupal offers a platform for content
Drupal offers a platform for easily controllable data
structures and data in it
Drupal offers fine-grained user access control
Drupal offers an online store
Drupal offers user-generated content and the storage
for it
11. From a WCMS to so
much more
Drupal is built to be a Web Content Management
System
Due to its flexibility, it’s slowly become much more
As a platform, it can be used in multiple roles
12. Drupal as a back-end
When removing the front-end from Drupal, it becomes
much more
Until Drupal 8, all Drupals returned HTML when getting
GET or POST requests
Drupal 8 changes this in the core, but earlier Drupals
could be made to do the same
13. Drupal as a back-end
Decoupling the HTML layer from the content was
originally aimed for flexibility for the front-end, essentially
headless Drupal
It also makes Drupal fully capable of connecting to any
display system, whether HTML-based or native
22. Example: A health
monitoring service
All textual content across
devices, with language
versions, can be easily
stored to Drupal
Changes to content as
well as news and
notifications can be
delivered straight to
people’s wrists from
23. Example: Self-service
gym
A mobile site, where
people could extend
their membership
Drupal can bill monthly,
or support pay-per-use
Smart lock would open
door for to a certain
Drupal user role
24. Example: Online store
for connected fridges
An app in a connected
fridge
A back-end as a Drupal
online store for groceries
Connected to a card
payment system, ERP for
product and balances and
logistics for orders
26. Serving machines
Drupal 7 has modules for serving all data out via
RESTWS or Services modules
Drupal 8 ships with a REST module in core
Restify and Drupal 8’s REST module are similar and are
both directed at accessing Drupal programmatically, for
example as a headless backend
27. Serving machines
Any service directed to behead a Drupal might not be
suitable as is for serving any machine out there
For example Drupal 8’s REST API is very Drupal-specific
out-of-the-box
I’d suggest you edit the REST interface for serving a
particular purpose instead of using the default REST
interface
28. Serving machines
A proper REST API needs to follow the rules (stateless,
cacheable, layered, uniform)
It also needs to be well-documented for integrations
Security, both by access and transit, need to be
considered
Also, take into account possibly needed changes by
versioning your REST feed
29. Serving machines
An Open API with proper documentation is a good way
to open up your resources for all the networked things
out there, but it’s not at all always enough
Many times you’ll have to integrate to a machine - even
if you might feel the architecture would be better served
if done the other way
30. Connecting to machines
Integrating to machines is different than integrating to
other services running on servers in server halls
It’s combining appalling reliability with poor to useless
network performance
And you’ll be connecting to 1 or 10 000 units
31. Connecting to machines
For connecting to machines, you’ll always have
implement a proper connection architecture
Simplest architectures would use queuing to prevent
failed connections from losing data
More elegant approach would be some kind of
messaging system, observer or publish/subscribe
design patterns
33. Building an external API
Sometimes the only solution is to not use Drupal for the
API, but serve the content to a separate system building
the API
I’ve talked about this in my “Accelerating headless
Drupal with Node.JS” presentation
34. Building an external API
In this approach you’ll index all your content outside
Drupal every time they get edited
To a MongoDB, SOLR, Elasticsearch, Redis or
whatever serves your purpose
Writes happen either separated or are queued in the
acceleration layer
Acceleration layer is built performance-oriented, with
e.g. Node.JS, Go or Rust
36. Building an external API
Enables you to have full control over the API
Enables you to aggregate and mix data from multiple
sources, like adding pricing information to Drupal’s
products from ERP - this is one of the principes of REST
And you’ll get blazing performance, if you do it right
37.
38. Taking Drupal to
enterprise
When trying to get Drupal to that “enterprise
background system” -level, you’ll might find resistance
Enterprise architects would like to keep to world
Microsoft-only and let Drupal stay outside, handling only
the sites
We need more reference implementations where Drupal
is taking control of serving all public-facing content of an
enterprise
40. “There’s service for that”
Luckily these days, there’s also a SaaS service for
everything
IFTTT or IF is the service of automating the internet of
things
41.
42.
43. On the Drupal end
IFTTT can read e.g. RSS feeds and you can easily
publish those e.g. with Views
You can push it via email to IFTTT
As far as I know, there’s NO open API for IFTTT, though