Skip to content

Latest commit

 

History

History
183 lines (117 loc) · 4.23 KB

03-coap.md

File metadata and controls

183 lines (117 loc) · 4.23 KB
CoAP

CoAP: Basics

Constrained Application Protocol

"A specialized web transfer protocol for use with constrained nodes and constrained networks in the Internet of Things."


  • CoRE, IETF group
  • Proposed standard: RFC 7252
  • CoAP ~ lightweight fast HTTP
  • Designed for manipulation of simple resources on constrained node networks

CoAP: RESTful environment


CoAP: RESTful environment

CoAP: Inspired by HTTP


CoAP: Inspired by HTTP

CoAP <---> Proxy <---> HTTP


CoAP: Inspired by HTTP

CoAP: HTTP vs CoAP


HTTP vs. CoAP

CoAP: Functionalities


  • URI
  • GET / POST / PUT / DELETE
  • Content-type support (XML, JSON, CBOR,...)
  • Built-in discovery.well-known/core
  • Multicast support
  • Asynchronous message exchanges
  • Designed to be extensible

CoAP: Client / Server

CoAP: Client-server

CoAP: Message format


CoAP: Client-server

CoAP: Confirmable


CoAP: Confirmable

CoAP: Non-confirmable


CoAP: Non-confirmable

CoAP: Reset


CoAP: Reset

CoAP: Reliability


  • Message reliability is handled at the application layer (UDP)
  • Congestion control (retransmits increase exponentially up to 247 s) — further improvements coming
  • These features can be disabled, if speed is the goal

CoAP: Reliability


CoAP: Reliability

CoAP: Observing resources I


  • Protocol extension for CoAP: RFC 7641
  • Client interested in a resource over period of time
  • Observer pattern
  • Server ~ Client (constrained device acts as a server)

CoAP: Observing resources II


CoAP: Observing resources

CoAP: Observing resources III


  • Extension added later to the CoAP spec
  • It transfers larger resource representations than can be usually accommodated in constrained networks
  • Response is split in blocks
  • Both sides have a say in the block size that actually will used
  • CoAP over TCP being drafted
  • Authentication & authorization inspired by OAUTH and JWT

CoAP: Learn more