How do Things talk ?
Christian Götz, dc-square
3rd June 2014
IoT Application Protocols
GPSGPS
GPS
GPS
GPS
GPS
GPS
Detected: Traffic Jam!
GPS
GPS
GPS
...but wait …who’s talking here ??
CEO & Founder of dc-square
We do IoT communication at scale
I talk and write about IoT and MQTT
I love to build new things...
20,000,000,000 devices
250 new devices every second
every person owns ≈ 7 devices
2020
http://blogs.cisco.com/news/cisco-c...
Language of the IoT?
Widely Known and Used
Polling
One way communication
Detailed Header
HTTP suitable for IOT ?
Challenges
Scalability
Security
Constrained Devices
Mobile
IoT challenges
“Real time” Data
HTTP is too verbose
HTTPCoAP
0 1 2 3!
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1!
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-...
CoAP RESTful
coap://host:port/path?param=value !
coap://localhost:5683/temp!
coap://server/temp/critical?above=42
CoAP
UDP
6LoWPan
HTTP
TCP
IP
CoAP vs HTTP
Client Server
Request
Response
Non-Confirmable Message
1/2
CoAP Message Flow
Client Server
Request
Response
Ack
Ack
Confirmable Message
2/2
CoAP Message Flow
Server
Client
http://tools.ietf.org/html/draft-ietf-core-observe-13
GetOptObserve
Response
Response
Response
Response
10 ℃...
CoAP RESTful
Discovery of Resources /.well-known/core
Multicast
Content-Negotiation
Proxy CoAP-HTTP and HTTP-CoAP
DTLS
CoAP Tools & Implementations
Californium and Copper Logo from http://people.inf.ethz.ch/mkovatsc/
Californium & Copper
+
M...
XMPP
developed for chat
based on XML
extensible
decentral / inter-server
TLS and SASL
XMPP at a glance
XMPP
XMPP
TCP
IP
XMPP stack
XMPP flow
<iq type =’get’!
from =’client@jax.de’!
to =‘tempsensor@jax.de’!
id =’S0001’>!
<req xmlns =’urn:xmpp:iot:sensord...
XMPP flow
<iq type =’result’!
from =’client@jax.de’!
to =‘tempsensor@jax.de’!
id =’S0001’>!
<accepted xmlns
=’urn:xmpp:iot...
XMPP flow
<message from =’...’ to =’...’>

<fields xmlns=’urn:xmpp:iot:sensordata’ seqnr =’1’
done =’true’>



<node nodeI...
From chat to IoT - status quo
Who’s a friend ?
Description...
Description...
Description...
Description...
Source: Wikipedia
implementations
323 Sensor Data experimental 04/2014
324 Provisioning experimental 03/2014
325 Control experimental 04/2014
326 Concentrat...
It’s still XML
XMPP Tool
Clients
!
http://xmpp.org/xmpp-software/libraries/
!
Server
!
http://xmpp.org/xmpp-software/servers/
Subscribe
Publish
Temperature Sensor MQTT-Broker
Laptop
Smart Phone
publish: “21°C“
publish: “21°C“
publish: “21°C“
subscribe
subscribe
Topics
lightweight
QoS Levels
Retained / LWT
MQTT over Websockets
Bridging
SSL
MQTT at a glance
London
BigBen
London Eye
people
temp
people
temp
/
/
MQTT topics 101
/
London
BigBen
London Eye
people
temp
people
temp
/
/
MQTT topics 101
/
The temperature of Big Ben London/BigBen/temp
London
BigBen
London Eye
people
temp
people
temp
/
/
MQTT topics 101
All temperature values London/+/temp
/
London
BigBen
London Eye
people
temp
people
temp
/
/
MQTT topics 101
All from the London Eye London/LondonEye/#
/
London
BigBen
London Eye
people
temp
people
temp
/
/
MQTT topics 101
All messages #
/
MQTT Broker
central communication point
different implementations
additional features
+ others
http://mqtt.org/wiki/doku.p...
MQTT for WSN
utilizes UDP
Gateway to MQTT
Topic Preregistration
Sleeping Clients
MQTT at a glance
-SN
Description...
Description...
Description...
MQTT-SN
UDP
6LoWPan
MQTT
TCP
IP
MQTT and MQTT-SN
REVAMPED REVAMPED
MQTT (with SSL) vs HTTPS
less battery
- Establishing 1st Connection

(compensated after 5,5 min)
+ Recon...
Description...
MQTT real world usage
https://www.facebook.com/notes/facebook-
engineering/building-facebook-messenger/
101...
MQTT tools
Public Broker
http://mqttdashboard.com
Java-Broker
with Plugin SDK
Client Lib
CoAP
HTTP
+ Others
protocol war
You Mean the One
and Unique Solutions
For All Problems
!
DOES NOT
EXIST?
coexistence
How to choose a protocol?
How constrained are the devices?
Reliable/unreliable network?
What is the message rate?
How is t...
15 NEW STORES
Description...
How to choose a protocol?
Thanks!
IoT Expo 2014
How Do ‘Things’ Talk? - An Overview of the IoT/M2M Protocol Landscape at IoT Expo 2014 in London
How Do ‘Things’ Talk? - An Overview of the IoT/M2M Protocol Landscape at IoT Expo 2014 in London
How Do ‘Things’ Talk? - An Overview of the IoT/M2M Protocol Landscape at IoT Expo 2014 in London
How Do ‘Things’ Talk? - An Overview of the IoT/M2M Protocol Landscape at IoT Expo 2014 in London
Upcoming SlideShare
Loading in...5
×

How Do ‘Things’ Talk? - An Overview of the IoT/M2M Protocol Landscape at IoT Expo 2014 in London

20,868

Published on

Analysts predict that by 2020, 50 billion devices will be connected to the Internet. Together with the fact that more and more of these “things” are connected over cellular networks, new challenges are introduced to the communication of Internet of Things (IoT) and machine-to-machine (M2M) scenarios. There are a lot of protocols which claim to be ideal for these use cases, for example MQTT and CoAP. In this session you will get an overview of commonly used protocols and their underlying architectural styles. We will also look at advantages/disadvantages, use cases and the ecosystem around them.

Published in: Internet, Technology, Spiritual

How Do ‘Things’ Talk? - An Overview of the IoT/M2M Protocol Landscape at IoT Expo 2014 in London

  1. 1. How do Things talk ? Christian Götz, dc-square 3rd June 2014 IoT Application Protocols
  2. 2. GPSGPS GPS GPS GPS GPS GPS Detected: Traffic Jam! GPS GPS GPS
  3. 3. ...but wait …who’s talking here ??
  4. 4. CEO & Founder of dc-square We do IoT communication at scale I talk and write about IoT and MQTT I love to build new things Christian Götz dc-square goetzchr
  5. 5. 20,000,000,000 devices 250 new devices every second every person owns ≈ 7 devices 2020 http://blogs.cisco.com/news/cisco-connections-counter/ http://www.cisco.com/web/about/ac79/docs/innov/IoT_IBSG_0411FINAL.pdf
  6. 6. Language of the IoT?
  7. 7. Widely Known and Used Polling One way communication Detailed Header HTTP suitable for IOT ?
  8. 8. Challenges
  9. 9. Scalability Security Constrained Devices Mobile IoT challenges “Real time” Data
  10. 10. HTTP is too verbose
  11. 11. HTTPCoAP
  12. 12. 0 1 2 3! 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+! |Ver| T | TKL | Code | Message ID |! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+! | Token (if any, TKL bytes) ...! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+! | Options (if any) ...! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+! |1 1 1 1 1 1 1 1| Payload (if any) ...! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+! CoAP no more headers
  13. 13. CoAP RESTful coap://host:port/path?param=value ! coap://localhost:5683/temp! coap://server/temp/critical?above=42
  14. 14. CoAP UDP 6LoWPan HTTP TCP IP CoAP vs HTTP
  15. 15. Client Server Request Response Non-Confirmable Message 1/2 CoAP Message Flow
  16. 16. Client Server Request Response Ack Ack Confirmable Message 2/2 CoAP Message Flow
  17. 17. Server Client http://tools.ietf.org/html/draft-ietf-core-observe-13 GetOptObserve Response Response Response Response 10 ℃ 8 ℃ 7 ℃ 5 ℃ 4 ℃ 10 ℃ 8 ℃ 7 ℃ 4 ℃ lost Response 5 ℃ CoAP Observe
  18. 18. CoAP RESTful Discovery of Resources /.well-known/core Multicast Content-Negotiation Proxy CoAP-HTTP and HTTP-CoAP DTLS
  19. 19. CoAP Tools & Implementations Californium and Copper Logo from http://people.inf.ethz.ch/mkovatsc/ Californium & Copper + More Implementations http://en.wikipedia.org/wiki/Constrained_Application_Protocol#Implementations
  20. 20. XMPP
  21. 21. developed for chat based on XML extensible decentral / inter-server TLS and SASL XMPP at a glance XMPP
  22. 22. XMPP TCP IP XMPP stack
  23. 23. XMPP flow <iq type =’get’! from =’client@jax.de’! to =‘tempsensor@jax.de’! id =’S0001’>! <req xmlns =’urn:xmpp:iot:sensordata’ seqnr =’1’ momentary =’true’ >! </iq> 1/3
  24. 24. XMPP flow <iq type =’result’! from =’client@jax.de’! to =‘tempsensor@jax.de’! id =’S0001’>! <accepted xmlns =’urn:xmpp:iot:sensordata’ seqnr =’1’/ >! </iq> 2/3
  25. 25. XMPP flow <message from =’...’ to =’...’>
 <fields xmlns=’urn:xmpp:iot:sensordata’ seqnr =’1’ done =’true’>
 
 <node nodeId =’Device01’>
 
 <timestamp value=‘2013-03-07T16:24:30’>" <numeric name =’Temperature’ 
 momentary =‘true’ automaticReadout =’true’ " value =’23.4’ unit =’°C’ >" </timestamp>" </node></fields></message> 3/3
  26. 26. From chat to IoT - status quo
  27. 27. Who’s a friend ?
  28. 28. Description... Description... Description... Description... Source: Wikipedia implementations
  29. 29. 323 Sensor Data experimental 04/2014 324 Provisioning experimental 03/2014 325 Control experimental 04/2014 326 Concentrators experimental 03/2014 347 Discovery experimental 04/2014 ??? Interoperability not approved ??? Pub/Sub IoT not existent Source: http://xmpp.org/xmpp-protocols/xmpp-extensions/ XMPP extensions
  30. 30. It’s still XML
  31. 31. XMPP Tool Clients ! http://xmpp.org/xmpp-software/libraries/ ! Server ! http://xmpp.org/xmpp-software/servers/
  32. 32. Subscribe
  33. 33. Publish
  34. 34. Temperature Sensor MQTT-Broker Laptop Smart Phone publish: “21°C“ publish: “21°C“ publish: “21°C“ subscribe subscribe
  35. 35. Topics lightweight QoS Levels Retained / LWT MQTT over Websockets Bridging SSL MQTT at a glance
  36. 36. London BigBen London Eye people temp people temp / / MQTT topics 101 /
  37. 37. London BigBen London Eye people temp people temp / / MQTT topics 101 / The temperature of Big Ben London/BigBen/temp
  38. 38. London BigBen London Eye people temp people temp / / MQTT topics 101 All temperature values London/+/temp /
  39. 39. London BigBen London Eye people temp people temp / / MQTT topics 101 All from the London Eye London/LondonEye/# /
  40. 40. London BigBen London Eye people temp people temp / / MQTT topics 101 All messages # /
  41. 41. MQTT Broker central communication point different implementations additional features + others http://mqtt.org/wiki/doku.php/brokers
  42. 42. MQTT for WSN utilizes UDP Gateway to MQTT Topic Preregistration Sleeping Clients MQTT at a glance -SN
  43. 43. Description... Description... Description... MQTT-SN UDP 6LoWPan MQTT TCP IP MQTT and MQTT-SN
  44. 44. REVAMPED REVAMPED MQTT (with SSL) vs HTTPS less battery - Establishing 1st Connection
 (compensated after 5,5 min) + Reconnect + Maintaining Connection + Receiving Messages + Sending Messages better throughput + Less Overhead + Persistent Sessions + Pub/Sub Architecture Source: http://stephendnicholas.com/archives/1217
  45. 45. Description... MQTT real world usage https://www.facebook.com/notes/facebook- engineering/building-facebook-messenger/ 10150259350998920
  46. 46. MQTT tools Public Broker http://mqttdashboard.com Java-Broker with Plugin SDK Client Lib
  47. 47. CoAP HTTP + Others
  48. 48. protocol war
  49. 49. You Mean the One and Unique Solutions For All Problems ! DOES NOT EXIST?
  50. 50. coexistence
  51. 51. How to choose a protocol? How constrained are the devices? Reliable/unreliable network? What is the message rate? How is the data processed further? Push or Pull ?
  52. 52. 15 NEW STORES Description... How to choose a protocol?
  53. 53. Thanks! IoT Expo 2014
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×