evolving rest for an iot world
play

Evolving REST for an IoT World Todd L. Montgomery @toddlmontgomery - PowerPoint PPT Presentation

Evolving REST for an IoT World Todd L. Montgomery @toddlmontgomery Representational State Transfer http://en.wikipedia.org/wiki/Representational_state_transfer @toddlmontgomery protocol noun \ pr -t - k o l, - k l, -


  1. Evolving REST for an IoT World Todd L. Montgomery @toddlmontgomery

  2. Representational State Transfer http://en.wikipedia.org/wiki/Representational_state_transfer @toddlmontgomery

  3. pro·to·col noun \ ˈ pr ō -t ə - ˌ k o ̇ l, - ˌ k ō l, - ˌ käl, -k ə l\ � ... � 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 > � @toddlmontgomery

  4. Stateless Client - Server Cacheable @toddlmontgomery

  5. Uniform Interface Hypermedia, Resources, URIs Layered Hmmm… @toddlmontgomery

  6. REST Ecosystem @toddlmontgomery

  7. Tools - CLI JSON HTTP/1.1,TCP, [TLS/SSL], IP Fast, Easy Integration Browser @toddlmontgomery

  8. IoT/IoE Ecosystem @toddlmontgomery

  9. Application HTTP/1.1 MQTT TLS/SSL? TCP Boards & Kits JSON IP ?? App App? SCADA Bluetooth Evolving Rapidly Multiple Stacks Environments @toddlmontgomery

  10. Publish/Subscribe Request/Response Request/Response Communication Patterns Streaming “Ingest” @toddlmontgomery

  11. History & Evolution @toddlmontgomery

  12. HTTP RFC 2068, 2616, …, 7230-7240 June 2014 Request Event Bi-Directional… kinda, … only but… one direction at-a-time Event Response Synchronous Request/Response @toddlmontgomery

  13. HTTP Request What happens Delay here while waiting? Processing Delay …Nothing… Response Stop-and-Wait @toddlmontgomery

  14. Head-Of-Line Blocking image courtesy www.tensator.com @toddlmontgomery

  15. Latency Sensitivity @toddlmontgomery

  16. Mobile “OK” Bandwidth + Long RTT + High Loss Rate + No Effective HTTP Pipelining Truly Awful User Experiences http://en.wikipedia.org/wiki/HTTP_pipelining @toddlmontgomery

  17. Asynchronous Request / Response Unlock More Reactive Patterns! @toddlmontgomery

  18. Web Services http://en.wikipedia.org/wiki/List_of_web_service_specifications Request No, seriously , lots of these!! Sync Event Request ACK … Response Sync Event Response ACK But… Async Request/Response… kinda @toddlmontgomery

  19. Thankfully, Locked within the Enterprise… Mostly… @toddlmontgomery

  20. Just because you could use HTTP, doesn’t mean you should … “Yeah, yeah, but your scientists were so preoccupied with whether or not they could that they didn't stop to think if they should .” — Jurassic Park Philosophy of some REST APIs @toddlmontgomery

  21. 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" http://en.wikipedia.org/wiki/Hyper_Text_Coffee_Pot_Control_Protocol @toddlmontgomery

  22. @toddlmontgomery

  23. BREW WHEN 418 I’m a teapot "This has a serious purpose – it identifies many of the ways in which HTTP has been extended inappropriately.” — Larry Masinter, author http://larry.masinter.net/ @toddlmontgomery

  24. Tooling Addressing Easy firewall traversal Why is HTTP used? Works with Anything Simple, Flexible, Familiar @toddlmontgomery

  25. Publish/Subscribe Request/Response Request/Response Communication Patterns Streaming “Ingest” @toddlmontgomery

  26. User State Security Query (Challenge) Request Response Keep-Alive Support or Watchdog (UI/Device) @toddlmontgomery

  27. Persistent connections help a LOT! Well designed protocols help a LOT MORE! Stay out of High Battery Life Energy State! Many simultaneous connections hurt! Using the wrong protocol with the wrong pattern hurts A LOT! The Wrong Patterns Hurt a LOT! @toddlmontgomery

  28. New Protocols & Standards @toddlmontgomery

  29. WebSocket RFC 6455 HTTP Upgrade Really a Async Transport Request/ Protocol Response h c t i w S 1 0 1 Events Events Ingest Streaming Full Duplex, Asynchronous “TCP over the Web” https://tools.ietf.org/html/rfc6455 @toddlmontgomery

  30. SPDY & HTTP/2 IETF Drafts Async Request Events Events Async Response Async Request/Response Multiple Streams Efficient Headers (HPACK) Binary Encoding http://www.ietf.org/id/draft-ietf-httpbis-http2-12.txt @toddlmontgomery

  31. WebSocket over HTTP/2 IETF Draft Async Async Response Request Events Events Ingest Streaming Full Duplex, Asynchronous with Multiple Channels/Streams http://www.ietf.org/id/draft-hirano-httpbis-websocket-over-http2-00.txt @toddlmontgomery

  32. Runs over TCP Broker-Based or WebSocket (v3.1.1) MQ Telemetry Transport (MQTT) OASIS Standard Lightweight MQTT-SN for non-TCP /IP Publish/Subscribe Messaging Transport http://mqtt.org/ @toddlmontgomery

  33. Standardized HTTP Runs over UDP , DTLS, Mapping or WebSocket Constrained Application Protocol (CoAP) IETF CoRE WG (Constrained RESTful Environments) Request/Response Resource Discovery, (either direction), Linking, etc. Publish/Subscribe http://www.ietf.org/id/draft-ietf-core-coap-18.txt @toddlmontgomery

  34. Sustain REST Principles Easily Parsed Standards-Based Requirements Easy to Implement Flexible - Easily Extended Efficient Handling of Data/Metadata @toddlmontgomery

  35. HTTP/2 WebSocket + MQTT Possible Game Plan(s) Combining IoT & REST WebSocket + CoAP WebSocket + HPACK @toddlmontgomery

  36. Nothing Optional, More complex TLS, HPACK, etc. than HTTP /1.1 HTTP/2 Ecosystems: Familiar Primitives REST Yes, IoT No @toddlmontgomery

  37. Ecosystems: HTTP Mapping? IoT Yes, WebSocket can adapt REST No (w/o WS) WebSocket + MQTT Some Guaranteed Enables Many Messaging Semantics Patterns @toddlmontgomery

  38. Not a Standard, HPACK handles but made of method + headers Standards WebSocket + HPACK HPACK is Use header for (subjectively) Stream ID complex http://www.ietf.org/id/draft-ietf-httpbis-header-compression-07.txt @toddlmontgomery

  39. Not Broker-based, HTTP Mapping Peer-to-Peer WebSocket + CoAP Ecosystems: No REST Yes, Guaranteed IoT Yes Messaging http://www.ietf.org/id/draft-savolainen-core-coap-websockets-02.txt @toddlmontgomery

  40. One More Thing… � JSON @toddlmontgomery

  41. Does not need to be human readable Thing 1 Thing 2 Not a human Also, …not a human Binary Encoding Concise Binary Object Representation (COBR) FIX / Simple Binary Encoding (SBE) HPACK (Part of HTTP /2) http://tools.ietf.org/html/rfc7049 https://github.com/real-logic/simple-binary-encoding @toddlmontgomery

  42. Questions? Kaazing http://www.kaazing.com • Slideshare http://www.slideshare.com/toddleemontgomery • Twitter @toddlmontgomery • Thank You! @toddlmontgomery

Recommend


More recommend