SlideShare a Scribd company logo
1 of 42
Evolving REST for an
IoT World
Todd L. Montgomery
@toddlmontgomery
@toddlmontgomery
Representational State Transfer
http://en.wikipedia.org/wiki/Representational_state_transfer
@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>
@toddlmontgomery
Client - Server
Cacheable
Stateless
@toddlmontgomery
Uniform Interface
Hypermedia, Resources,
URIs
Layered
Hmmm…
@toddlmontgomery
REST Ecosystem
@toddlmontgomery
Tools - CLI
Browser
JSON
Fast, Easy
Integration
HTTP/1.1,TCP,
[TLS/SSL], IP
@toddlmontgomery
IoT/IoE Ecosystem
@toddlmontgomery
Boards & Kits
Environments
JSON
??
Evolving
Rapidly
HTTP/1.1
TLS/SSL?
TCP
IP
Bluetooth
MQTT
SCADA
Application
App? App
Multiple
Stacks
@toddlmontgomery
Communication Patterns
Request/Response
Streaming “Ingest”
Publish/Subscribe
Request/Response
@toddlmontgomery
History & Evolution
@toddlmontgomery
Request
Response
HTTP
RFC 2068, 2616, …, 7230-7240
Synchronous
Request/Response
Bi-Directional… kinda,
but…
Event
Event
… only
one direction
at-a-time
June 2014
@toddlmontgomery
Request
Response
Delay
Delay
Processing
What happens
here while
waiting?
…Nothing…
Stop-and-Wait
HTTP
@toddlmontgomery
image courtesy www.tensator.com
Head-Of-Line
Blocking
@toddlmontgomery
Latency Sensitivity
@toddlmontgomery
Mobile
“OK” Bandwidth + Long RTT + High Loss Rate + No Effective HTTP Pipelining
http://en.wikipedia.org/wiki/HTTP_pipelining
Truly Awful User Experiences
@toddlmontgomery
Asynchronous Request / Response
Unlock More Reactive Patterns!
@toddlmontgomery
Request
ACK
Response
ACK
Sync
Request
Sync
Response
Web Services
…
But… Async Request/Response… kinda
Event
Event
http://en.wikipedia.org/wiki/List_of_web_service_specifications
No, seriously,
lots of these!!
@toddlmontgomery
Thankfully, Locked within the
Enterprise…
Mostly…
@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…
@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"
@toddlmontgomery
@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/
@toddlmontgomery
Why is HTTP used?
Easy firewall traversal
Simple, Flexible, Familiar
Works with Anything
Addressing
Tooling
@toddlmontgomery
Communication Patterns
Request/Response
Streaming “Ingest”
Publish/Subscribe
Request/Response
@toddlmontgomery
Request
Response
Support
(UI/Device)
Security
(Challenge)
Keep-Alive
or Watchdog
User State
Query
@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!
@toddlmontgomery
New
Protocols & Standards
@toddlmontgomery
Async
Request/
Response
Streaming
WebSocket
RFC 6455
Full Duplex, Asynchronous
“TCP over the Web”
EventsEvents
Ingest
https://tools.ietf.org/html/rfc6455
Really a
Transport
Protocol
@toddlmontgomery
Async
Request
Async
Response
SPDY & HTTP/2
IETF Drafts
Async Request/Response
Multiple Streams
Efficient Headers (HPACK)
Binary Encoding
Events
Events
http://www.ietf.org/id/draft-ietf-httpbis-http2-12.txt
@toddlmontgomery
Async
Request
Async
Response
WebSocket over HTTP/2
IETF Draft
Streaming Ingest
Full Duplex, Asynchronous
with Multiple Channels/Streams
Events
Events
http://www.ietf.org/id/draft-hirano-httpbis-websocket-over-http2-00.txt
@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
@toddlmontgomery
Constrained Application Protocol
(CoAP)
http://www.ietf.org/id/draft-ietf-core-coap-18.txt
Runs over UDP, DTLS,
or WebSocket
Request/Response
(either direction),
Publish/Subscribe
Standardized HTTP
Mapping
Resource Discovery,
Linking, etc.
IETF CoRE WG (Constrained RESTful Environments)
@toddlmontgomery
Sustain REST Principles
Standards-BasedEasily Parsed
Efficient Handling of Data/Metadata
Flexible - Easily ExtendedEasy to Implement
Requirements
@toddlmontgomery
Possible Game Plan(s)
WebSocket + MQTTHTTP/2
WebSocket + CoAP WebSocket + HPACK
Combining IoT & REST
@toddlmontgomery
HTTP/2
Nothing Optional,
TLS, HPACK, etc.
Familiar Primitives
More complex
than HTTP/1.1
Ecosystems:
REST Yes,
IoT No
@toddlmontgomery
WebSocket + MQTT
HTTP Mapping?
WebSocket can adapt
Some Guaranteed
Messaging Semantics
Ecosystems:
IoT Yes,
REST No (w/o WS)
Enables Many
Patterns
@toddlmontgomery
WebSocket + HPACK
http://www.ietf.org/id/draft-ietf-httpbis-header-compression-07.txt
HPACK handles
method + headers
Use header for
Stream ID
Not a Standard,
but made of
Standards
HPACK is
(subjectively)
complex
@toddlmontgomery
WebSocket + CoAP
http://www.ietf.org/id/draft-savolainen-core-coap-websockets-02.txt
HTTP Mapping
Ecosystems:
REST Yes,
IoT Yes
No
Guaranteed
Messaging
Not Broker-based,
Peer-to-Peer
@toddlmontgomery
One More Thing…
JSON
@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)
@toddlmontgomery
Questions?
• Kaazing http://www.kaazing.com
• Slideshare http://www.slideshare.com/toddleemontgomery
• Twitter @toddlmontgomery
Thank You!

More Related Content

Viewers also liked

Amazon Echo 기반 IoT 서비스 개발을 위한 Alexa Skills Kit 및 AWS Lambda 활용 (윤석찬)
Amazon Echo 기반 IoT 서비스 개발을 위한 Alexa Skills Kit 및 AWS Lambda 활용 (윤석찬) Amazon Echo 기반 IoT 서비스 개발을 위한 Alexa Skills Kit 및 AWS Lambda 활용 (윤석찬)
Amazon Echo 기반 IoT 서비스 개발을 위한 Alexa Skills Kit 및 AWS Lambda 활용 (윤석찬)
Amazon Web Services Korea
 

Viewers also liked (8)

DDD 구현기초 (거의 Final 버전)
DDD 구현기초 (거의 Final 버전)DDD 구현기초 (거의 Final 버전)
DDD 구현기초 (거의 Final 버전)
 
더 빠른 웹을 위해: HTTP/2
더 빠른 웹을 위해: HTTP/2더 빠른 웹을 위해: HTTP/2
더 빠른 웹을 위해: HTTP/2
 
AWS re:Invent 특집(1) – 파이선(Python) 개발자를 위한 AWS 활용 방법 (윤석찬)
AWS re:Invent 특집(1) – 파이선(Python) 개발자를 위한 AWS 활용 방법 (윤석찬)AWS re:Invent 특집(1) – 파이선(Python) 개발자를 위한 AWS 활용 방법 (윤석찬)
AWS re:Invent 특집(1) – 파이선(Python) 개발자를 위한 AWS 활용 방법 (윤석찬)
 
Amazon Echo 기반 IoT 서비스 개발을 위한 Alexa Skills Kit 및 AWS Lambda 활용 (윤석찬)
Amazon Echo 기반 IoT 서비스 개발을 위한 Alexa Skills Kit 및 AWS Lambda 활용 (윤석찬) Amazon Echo 기반 IoT 서비스 개발을 위한 Alexa Skills Kit 및 AWS Lambda 활용 (윤석찬)
Amazon Echo 기반 IoT 서비스 개발을 위한 Alexa Skills Kit 및 AWS Lambda 활용 (윤석찬)
 
DressRush Pitch Deck
DressRush Pitch DeckDressRush Pitch Deck
DressRush Pitch Deck
 
Ultimate Guide to Funnel Optimization
Ultimate Guide to Funnel OptimizationUltimate Guide to Funnel Optimization
Ultimate Guide to Funnel Optimization
 
(MBL301) Creating Voice Experiences Using Amazon Alexa
(MBL301) Creating Voice Experiences Using Amazon Alexa(MBL301) Creating Voice Experiences Using Amazon Alexa
(MBL301) Creating Voice Experiences Using Amazon Alexa
 
IoT Apps with AWS IoT and Websockets
IoT Apps with AWS IoT and Websockets IoT Apps with AWS IoT and Websockets
IoT Apps with AWS IoT and Websockets
 

Similar to QCon NY 2014 - Evolving REST for an IoT World

CSU33012-I-microservices.pdf
CSU33012-I-microservices.pdfCSU33012-I-microservices.pdf
CSU33012-I-microservices.pdf
Ricky Garg
 
D1-3-Signaling
D1-3-SignalingD1-3-Signaling
D1-3-Signaling
Oleg Levy
 

Similar to QCon NY 2014 - Evolving REST for an IoT World (20)

IoTaConf 2014 - IoT Connectivity, Standards, and Architecture
IoTaConf 2014 - IoT Connectivity, Standards, and ArchitectureIoTaConf 2014 - IoT Connectivity, Standards, and Architecture
IoTaConf 2014 - IoT Connectivity, Standards, and Architecture
 
Reactive Programming Models for IoT
Reactive Programming Models for IoTReactive Programming Models for IoT
Reactive Programming Models for IoT
 
Utopoll Whitepaper.pdf
Utopoll Whitepaper.pdfUtopoll Whitepaper.pdf
Utopoll Whitepaper.pdf
 
API Design and WebSocket
API Design and WebSocketAPI Design and WebSocket
API Design and WebSocket
 
UTOPOLL白皮書.pdf
UTOPOLL白皮書.pdfUTOPOLL白皮書.pdf
UTOPOLL白皮書.pdf
 
The Web of Things
The Web of ThingsThe Web of Things
The Web of Things
 
WebRTC Standards from Tim Panton
WebRTC Standards from Tim PantonWebRTC Standards from Tim Panton
WebRTC Standards from Tim Panton
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guide
 
Buildstuff - what do you need to know about RPC comeback
Buildstuff - what do you need to know about RPC comebackBuildstuff - what do you need to know about RPC comeback
Buildstuff - what do you need to know about RPC comeback
 
Zenoh: The Genesis
Zenoh: The GenesisZenoh: The Genesis
Zenoh: The Genesis
 
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriyaIPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
 
DIY Internet: Snappy, Secure Networking with MinimaLT (JSConf EU 2013)
DIY Internet: Snappy, Secure Networking with MinimaLT (JSConf EU 2013)DIY Internet: Snappy, Secure Networking with MinimaLT (JSConf EU 2013)
DIY Internet: Snappy, Secure Networking with MinimaLT (JSConf EU 2013)
 
Lesson4.9 d u4l3 hierarchy of open protocols
Lesson4.9 d u4l3 hierarchy of open protocolsLesson4.9 d u4l3 hierarchy of open protocols
Lesson4.9 d u4l3 hierarchy of open protocols
 
CSU33012-I-microservices.pdf
CSU33012-I-microservices.pdfCSU33012-I-microservices.pdf
CSU33012-I-microservices.pdf
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)
 
Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2
Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2
Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2
 
D1-3-Signaling
D1-3-SignalingD1-3-Signaling
D1-3-Signaling
 
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
 
Where is the Internet? (2019 Edition)
Where is the Internet? (2019 Edition)Where is the Internet? (2019 Edition)
Where is the Internet? (2019 Edition)
 
HTTP/2 and a Faster Web
HTTP/2 and a Faster WebHTTP/2 and a Faster Web
HTTP/2 and a Faster Web
 

Recently uploaded

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Recently uploaded (20)

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 

QCon NY 2014 - Evolving REST for an IoT World