Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Extreme Messaging for the Internet of Things

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for Mark Wolfe Mark Wolfe
August 13, 2013

Extreme Messaging for the Internet of Things

Talk I gave at http://campjs.com in August 2013 with a brief overview of the MQTT protocol.

Avatar for Mark Wolfe

Mark Wolfe

August 13, 2013
Tweet

More Decks by Mark Wolfe

Other Decks in Technology

Transcript

  1. Internet of Things • Physical Computing • Sensor networks •

    UX for your environment • More intuitive • More efficient Tuesday, 13 August 13
  2. Technical Challenges • More devices == More Connections • Wireless...

    sucks • Channel doesn’t matter anymore • Use 5.4ghz if you can Tuesday, 13 August 13
  3. MQTT • Lightweight Protocol • Uses TCP on port 1883

    • fixed-length header is just 2 bytes • Uses Transport Layer Security (TLS) Tuesday, 13 August 13
  4. MQTT Why? • Where the network is expensive, has low

    bandwidth or is unreliable • When run on an embedded device with limited processor or memory resources • Where you want a simple and lean protocol to carry small payloads Tuesday, 13 August 13
  5. MQTT QOS • Three qualities of service for message delivery:

    • At most once • At least once • Exactly once Tuesday, 13 August 13
  6. How to Publish • Topics • Like a mail box

    • example $devices/123/events Tuesday, 13 August 13
  7. How To Subscribe • Like a mailing list • Subscriptions

    • Has a concept of wild cards • $device/#/events • $device/# Tuesday, 13 August 13
  8. Why not just HTTP? • Large preamble • Keepalives? •

    Complex to parse • Can use a lot of memory, 4k headers buffer • No mechanism for reliable transmission of data unless you ws-* Tuesday, 13 August 13
  9. Questions? • Is there any examples of MQTT in production?

    • Facebook is running MQTT on 600M mobiles and tablets • Is there a simple stream NodeJS based API for MQTT? • Myself and Tim Oxley are working on it. Tuesday, 13 August 13
  10. Contact • On twitter @wolfeidau • On Github http://github.com/wolfeidau •

    On the web http://www.wolfe.id.au Tuesday, 13 August 13