Why HTTP Won’t Work For IoTTim Kellogg
Principal Software Engineer
@kellogh
About Me
Backend Cloud Services
Simple Designs
Abstractions Are Good
Internet of Things
Embedded Internet IoT
Internet of Things
Constrained environments• Constrained memory footprint MCUs• Embedded Linux• No OS
Unreliable network connectivity
Constrained devices
Telemetry
Device to server
Sensor readings
Big data & analytics
Telemetry
BrokerPublishCloud
ConnectorsSubscribe
Salesforce1Platform
Subscribe
Devices
Sensors
HTTPFor request / response
HTTP
Client ServerRequest
Response
HTTP
Consumer must be available at all times
Publisher needs to know the exact destination
Publisher depends on the response status
MQTT
Broker must be available at all times• Doesn’t do any processing, failure is uncommon
Publisher and subscriber are decoupled• Publisher publishes at it’s leisure• Subscriber processes messages at it’s leisure
Publisher does not care who (if anyone) it’s publishing to
Publisher doesn’t care about the result of processing
Quality of Service (QoS)
0 – fire and forget
1 – Guaranteed delivery at least once
2 – Guaranteed delivery exactly once• Can be easily implemented client-side by
using QoS 1 to increase throughput
Topics
Hierarchical• a/b/c• com.example/sensors/sen546/temp• CTL/com.example/sensors/sen546
“+” matches single level• com.example/sensors/+/temp• +/sensors/sen546
“#” matches many level, must be at end• com.example/sensors/#• CTL/com.example/#
MQTT Features
Last will and testament• Unexpected disconnects
Retained messages• Infrequently published values
MQTT-SN
MQTT for Sensor Networks
UDP + 6LoWPAN
Gateway
Configuration-free discovery
MQTT-SN
Gateway
Broker
CoAPA lighter version of HTTP with some extra bells and whistles
Constrained Application Protocol
REST
HTTP mappings for proxy servers
Very lightweight messages
UDP + 6LoWPAN
Confirmable messages
Additional response messages sent whenever the resource changes
No polling
GET+Observe
Resources
IoT Zone
MQTT & CoAP• http://iot.eclipse.org/ • https://app.thingfabric.com/
Hardware• http://www.kelloggsresearchlabs.com/PressRele
aseGenerator
@kellogh
APPENDIX
CONFIDENTIAL - 2lemetry, LLC
We power the connected enterprise
• 2lemetry is an IoT technology and solutions company that powers the connected enterprise, tying people, processes, data and devices together—transforming raw data into real-time actionable intelligence.
• Founded 2011—spun off from hardware manufacturer
• 100% Focus on Internet of Things—with a “cloud first” focus
Technology - ThingFabric
Broker Layer
Data Storage
CEP EngineRules Engine
REST API
Regional Load Balancing
• Historical data storage• Automation replication• Schemaless
• Find trends• Run computations• Build complex models
• HTTP webhook• Republish rules• SMS/Email• Reformat payloads
• Supports custom protocols• Supports MQTT, Stomp, CoAP• Balanced by geographical response time
2lemetry technology, solutions, partners and expertise to provide an end to end solution
Technology2lemetry Device Cloud Platform
SolutionsEnterprise system integration tools
Digital signage
Proximity sensing
Facial recognition
PartnersAcross entire IoT project lifecycle
Sales channel
ExpertiseIoT strategy
Integration expertise and application development
Managed service and support
CONFIDENTIAL - 2lemetry, LLC