Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/1kYLiRR.
Todd Montgomery explains using WebSocket and reactive programming in an event driven RESTful architecture for the emerging IoT world. Filmed at qconnewyork.com.
Todd Montgomery is a networking hacker who has researched, designed, and built numerous protocols, messaging-oriented middleware systems, and real-time data systems, done research for NASA, contributed to the IETF and IEEE, and co-founded two startups. He currently works for Kaazing as Chief Architect.
2. InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
http://www.infoq.com/presentations
/rest-websocket-iot
3. Presented at QCon New York
www.qconnewyork.com
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
5. @toddlmontgomery
pro·to·col noun ˈprō-tə-ˌkȯ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>
!
18. @toddlmontgomery
Mobile
“OK” Bandwidth + Long RTT + High Loss Rate + No Effective HTTP Pipelining
http://en.wikipedia.org/wiki/HTTP_pipelining
Truly Awful User Experiences
22. @toddlmontgomery
“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
Just because you could use
HTTP, doesn’t mean you should…
23. @toddlmontgomery
HTCPCP
RFC 2324, Extended by RFC 7168
http://en.wikipedia.org/wiki/Hyper_Text_Coffee_Pot_Control_Protocol
"there is a strong, dark, rich requirement for a protocol designed
espressoly [sic] for the brewing of coffee"
25. @toddlmontgomery
418 I’m a teapot
BREW
WHEN
"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/
26. @toddlmontgomery
Why is HTTP used?
Easy firewall traversal
Simple, Flexible, Familiar
Works with Anything
Addressing
Tooling
29. @toddlmontgomery
Battery Life
Persistent connections help a LOT!
Well designed protocols help a LOT MORE!
Many simultaneous connections hurt!
Using the wrong protocol with the wrong pattern hurts A LOT!
The Wrong Patterns Hurt a LOT!
Stay out of High
Energy State!
34. @toddlmontgomery
MQ Telemetry Transport (MQTT)
http://mqtt.org/
Lightweight
Publish/Subscribe
Messaging Transport
Runs over TCP
or WebSocket (v3.1.1)
MQTT-SN for non-TCP/IP
Broker-Based
OASIS Standard
43. @toddlmontgomery
Binary Encoding
Thing 1 Thing 2
Not a human Also, …not a human
Does not need to be
human readable
http://tools.ietf.org/html/rfc7049
Concise Binary Object Representation (COBR)
FIX / Simple Binary Encoding (SBE)
https://github.com/real-logic/simple-binary-encoding
HPACK (Part of HTTP/2)