apidays LIVE Australia - Building Business Ecosystems
Building a scalable API platform for an IoT ecosystem
Pooja Subramanian, Lead Consultant at ThoughtWorks & Archanaa Ravikumar, Lead Engineer at BCG Digital Ventures
apidays LIVE Australia - Building a scalable API platform for an IoT ecosystem by Archanaa Ravikumar & Pooja Subramanian
1. Architecting Scalable
Software Platforms for
IoT Applications
Archanaa Ravikumar
Lead Engineer, BCG Digital Ventures
Pooja Subramanian
Lead Consultant, ThoughtWorks Technologies
2. IoT STACK
Smart light
Temperature
Sensor
Security
Camera
Level 1-2
Sensors
Actuators
Devices
Pressure
sensor
adapter
Camera
adapter
ZWave
adapter
Level 3
Adapters
Gateway On-Prem
Level 4-5
Cloud Platform
Services
Level 6
Mobile, Web
Applications
Zigbee
adapter
Icons made by Good Ware from www.flaticon.com is licensed by Creative Commons BY 3.0"
Heat
Sensor
Air cooler
Sprinkler
3. AN IoT APPLICATION
Icons made by Good Ware from www.flaticon.com is licensed by Creative Commons BY 3.0"
4. IoT PLATFORM - WHAT’S DIFFERENT?
Scale
Security
Continuous
Improvement
Icons made by Freepik from www.flaticon.com
Context Mapping
Device
Representation
5. CONTEXT MAPPING
Icons made by Good Ware from www.flaticon.com is licensed by Creative Commons BY 3.0"
Mostly uncategorized control
data for multiple building
applications
Smart Building Applications in
Cloud or on Prem
Outside Air Temperature
Humidity
Room Temperature
Occupancy Status
Time Series Data
Sensor Metadata
GUI Data
Event Data
7. ACTOR MODEL
● Reliable actor model
● Concurrent processes that run with
individual context
● Representation of relationship between
devices
● Each actor can send messages to other
related actors
● Persisted actor state
Thermostat
actor
AC actor
Fire alarm
actor
Sprinkler actor
Control unit
actor
Icons made by Good Ware from www.flaticon.com is licensed by Creative Commons BY 3.0"
8. HIERARCHY OF ACTORS
Hotel Timbaktoo
Floor 2Floor 1
Room 1 Room 2
Thermostat
Floor 3
Air-conditioner
{
"id" : "512cde1a-2343-4b36-a045-603732b3f30a",
"name" : "Hotel Timbaktoo",
"documentType" : "Building",
"floors" : [
"245866c5-87d4-4426-b8f8-aed71212de84",
"e52e3a21-2eb2-43ed-bbb3-5c7e5c0cad7f",
"c7e1226a-d77e-4c21-988d-28f88443bb0a"
],
"path" : "hotels/512cde1a-2343-4b36-a045-603732b3f30a"
...
...
}
Icons made by Good Ware from www.flaticon.com is licensed by Creative Commons BY 3.0"
10. 1. Provide specifications, code and a certification program to enable manufacturers to
bring OCF Certified products to the market that can interoperate with current IoT
devices and legacy systems.
2. Make the end user’s experience better by seamlessly bridging to other ecosystems
within a user’s smart home and ensure interoperability with OCF compliant devices.
OCF
11. DEFINITION OF A THING
Image and details from open connectivity org
https://openconnectivity.org/specs/OCF_2.0_Specification_Overview.pdf
12. DEFINITION OF A THING
Image and details from open connectivity org
https://openconnectivity.org/specs/OCF_Core_Specification_v2.2.0.pdf
13. ● Number of edge
devices
● Volume of data
● Frequency of data
transmitted
SCALE
Icons made by Good Ware from www.flaticon.com is licensed by Creative Commons BY 3.0"
14. Gateway
● Provide bi-directional
communication between
edge devices and
controllers
● Register and provision
devices
● Enable improved security
● Abstract multiple
protocols used for
edge-cloud connectivity
Telemetry Service
● Accept a continuous
stream of device
metadata
● Process all incoming
telemetry data
● Use rule-based routing
of data to other
services
Time series Database
● Ingest change that
sensors capture over a
range of time
● Handle high write loads
● Improve efficiency by
treating time as a first
class citizen
Cache
● Store pre-processed data
● Aid in quicker decision
making
● Allow configurable cache
updates
● Aid in availability when
systems go down
temporarily
SCALE
Icons made by Good Ware from www.flaticon.com is licensed by Creative Commons BY 3.0"
15. ● Platform security
○ Roles and access controls
● 2FA for device authorization
○ Certificate on the device that needs
to be validated by the app
○ QR code scanning
● Absence of telemetry
● Data confidentiality
● Protocol security
● Firmware vulnerabilities
○ Patch updates
SECURITY
Icons made by Good Ware from www.flaticon.com is licensed by Creative Commons BY 3.0"
16. ● CI/CD pipeline across devices and platforms
● Unit tests at mobile, web, cloud applications and devices
● Monitoring post deployments across all layers
● OTA updates and graceful upgrades
● Complexity caused by
○ Version updates
○ Protocol changes
CI/CD
Commit stage
Automated
Testing
Deploy to test
devices
Integrated
testing
Release
17. App
Device command/query
API Gateway
Device
SensorSensor
Other services
Device Management
Service
Telemetry Service
IoT Hub
Sends device command
Device
Data
Receives telemetry
Backend Services
AMQP
Bluetooth
(Installation)
App
Zwaveproprietary
Monitoring
Dashboard
Timeseries
DB
Web socket comms
SAMPLE ARCHITECTURE
18. Thank You
Archanaa Ravikumar
Lead Engineer, BCG Digital Ventures
archanaa.ravikumar@bcgdv.com
https://www.linkedin.com/in/ravikumar-archanaa/
Pooja Subramanian
Lead Consultant, ThoughtWorks Technologies
poojas@thoughtworks.com
https://www.linkedin.com/in/pooja-subramanian-17bbba3b/