Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

IoTaConf 2014 - IoT Connectivity, Standards, and Architecture

Communication Patterns, Protocols, and Architecture in IoT.

  • Login to see the comments

IoTaConf 2014 - IoT Connectivity, Standards, and Architecture

  1. 1. IoT Connectivity, Standards & Architecture Todd L. Montgomery @toddlmontgomery IOTAConf! October 20-21, 2014!
  2. 2. Communication Patterns Lead to… Protocols (Standards?) Lead to… Architecture “Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering.” — Yoda
  3. 3. Communication Patterns
  4. 4. Request Response What most of us think happens
  5. 5. Request Response And that is… what really happens… but…
  6. 6. But… Who does this? Request Response What also really happens
  7. 7. Request Response @toddlmontgomery Support (UI/Device) Security (Challenge) Keep-Alive or Watchdog User State Query
  8. 8. News, Stocks, Texts/SMS, Video, Audio, Social, … Stream What also really happens
  9. 9. Temperature, Heart Rate, Web Logs, Sensor Data, Seismic Readings, Steps, Stairs, Gyro Data, GPS, Acceleration, Breathing, EKG, EEG, … Ingest What also really happens
  10. 10. Pretty much how everything actually works… Request Stream & Ingest Response What also really happens
  11. 11. What also REALLY happens
  12. 12. Request, Response, Stream, and Ingest are really types Message Message The Break Down Message-Driven Message-Driven
  13. 13. Message Driven Reactive Applications Elastic Responsive Resilient
  14. 14. Meanwhile… IoT…
  15. 15. HTCPCP RFC 2324, Extended by RFC 7168 "there is a strong, dark, rich requirement for a protocol designed espressoly [sic] for the brewing of coffee" @toddlmontgomery
  16. 16. @toddlmontgomery
  17. 17. BREW 418 I’m a teapot WHEN "This has a serious purpose – it identifies many of the ways in which HTTP has been extended inappropriately.” — Larry Masinter, author @toddlmontgomery
  18. 18. courtesy of
  19. 19. Sometimes it is good to reinvent the wheel
  20. 20. What History Has Taught Us @toddlmontgomery
  21. 21. THE IoT Language!
  22. 22. THE IoT Protocol!
  23. 23. THE IoT Runtime!
  24. 24. THE IoT ______!
  25. 25. Internet of Things Multi-Lingual (and Polyglot) Multi-Protocol & Multi-Standard Multi-“Platform” Massive Scale Highly Integrated What is already is…
  26. 26. Connected. Integrated. Great time to be a protocol geek!
  27. 27. pro·to·col noun ˈprō-tə-ˌkȯl, -ˌkōl, -ˌkäl, -kəl @toddlmontgomery ! ... ! 3 b : a set of conventions governing the treatment and especially the formatting of data in an electronic communications system <network protocols> ... 3 a : a code prescribing strict adherence to correct etiquette and precedence (as in diplomatic exchange and in the military services) <a breach of protocol> !
  28. 28. Protocols are the key to Integration REST has demonstrated this! @toddlmontgomery
  29. 29. Protocols & Standards @toddlmontgomery
  30. 30. Binary Encoding helps save CPU & Bandwidth! Persistent connections help a LOT! (fewer frames) Well designed protocols help a LOT MORE! Battery Life Many simultaneous connections hurt! Using the wrong protocol with the wrong pattern hurts A LOT! @toddlmontgomery Stay out of High Energy State! One reason why we should care about Protocols… ASCII Encoding hurts CPU & Bandwidth!
  31. 31. HTTP RFC 2068, 2616, …, 7230-7240 Request Response Synchronous Request/Response @toddlmontgomery Bi-Directional… kinda, but… Event Event June 2014 … only one direction at-a-time
  32. 32. Request ACK Response ACK @toddlmontgomery Sync Request Sync Response Web Services … Event Event But… Async Request/Response… kinda No, seriously, lots of these!!
  33. 33. HTTP Upgrade 101 Switch Events Events @toddlmontgomery Async Request/ Response Really a Transport Protocol Streaming WebSocket RFC 6455 Full Duplex, Asynchronous “TCP over the Web” Ingest
  34. 34. Events Events @toddlmontgomery Async Request Async Response SPDY & HTTP/2 IETF Drafts Async Request/Response Multiple Streams Efficient Headers (HPACK) Binary Encoding
  35. 35. There is emerging implementation experience and interest in a protocol that retains the semantics of HTTP without the legacy of HTTP/1.x message framing and syntax, which have been identified as hampering performance and encouraging misuse of the underlying transport. — IETF httpbis Charter
  36. 36. Events Events @toddlmontgomery Async Request Async Response WebSocket over HTTP/2 IETF Draft Streaming Ingest Full Duplex, Asynchronous with Multiple Channels/Streams
  37. 37. Runs over TCP or WebSocket (v3.1.1) Broker-Based MQ Telemetry Transport (MQTT) @toddlmontgomery Lightweight Publish/Subscribe Messaging Transport MQTT-SN for non-TCP/IP OASIS Standard
  38. 38. Constrained Application Protocol (CoAP) IETF CoRE WG (Constrained RESTful Environments) @toddlmontgomery Runs over UDP, DTLS, or WebSocket Request/Response (either direction), Publish/Subscribe Standardized HTTP Mapping Resource Discovery, Linking, etc. RFC 7252
  39. 39. Extensible Messaging & Presence Protocol (XMPP) @toddlmontgomery Brokered TCP + TLS + SASL Presence & Persistent Streams XMPP Standards Foundation (Semi) Structured XML IETF RFC 6120 (obsoletes 3920)
  40. 40. XMPP HTTP/1.1 Protocols? Shared Memory IPC CoAP AMQP WebSocket JMS WebRTC Not just in the traditional sense… MQTT HTTP/2 TCP/UDP/IP Aeron 0MQ DDS
  41. 41. Architectures @toddlmontgomery
  42. 42. Micro-Services Architectures @toddlmontgomery
  43. 43. Rx Languages Erlang & Elixir Go And Frameworks RxJS RxJava Akka Streams Akka Rust
  44. 44. @toddlmontgomery Client? Device? Browser? Back-End? DMZ? Protocols Protocols Protocols
  45. 45. Micro Architecture @toddlmontgomery
  46. 46. Protocols Deployment Container Nuklei Logic Reactive Message Stream Depends on language, runtime, platform, etc. Asynchronous Binary “Loose” Ordering Client? Server? Browser? Device? ALL!
  47. 47. Choice of protocols becomes deployment concern Protocols Deployment Container Nuklei Logic Reactive Message Stream Consistent ABI Various Protocol Options Asynchronous Binary Boundary
  48. 48. Message Message To Sum Up Message-Driven Message-Driven
  49. 49. @toddlmontgomery Questions? • Kaazing • GitHub • Reactive Manifesto • SlideShare • Twitter @toddlmontgomery Thank You!