The IETF Constrained RESTful Environments (CORE) working group has defined the Constrained Application Protocol (CoAP) which easily translates to HTTP for integration with the web, while meeting specialized requirements such as: multicast support, very low overhead, and simplicity for constrained environments. CoAP has been designed as a generic protocol for LLNs taking into account the features of the underlying architecture. The CORE working group, instead of blindly making a compression of HTTP, defined a subset of the RESTful specification, making it interoperable with HTTP but also specializing it for so constrained environments.
The summary of the main features addressed by CoAP are:
- Constrained web protocol specialized to M2M requirements.
- Stateless HTTP mapping through the use of proxies or direct mapping of HTTP interfaces to CoAP.
- UDP transport with application layer reliable unicast and best-effort multicast support.
- Asynchronous message exchanges.
- Low header overhead and parsing complexity.
- URI and Content-type support.
- Simple proxy and caching capabilities.
- Optional resource discovery.
- Observe mechanism for asynchronous notifications.
Unlike HTTP, CoAP is an asynchronous request/response protocol over a datagram oriented transport such as UDP. The client/server architecture of HTTP is slightly different in CoAP as endpoints do not assume a so clear role. This is motivated by the nature of the underlying transport, which is asynchronous (i.e., datagram oriented), and both endpoints acting as clients and servers. The architecture of CoAP is divided in two layers, a message layer in charge of reliability and sequencing and a request/response layer in charge of mapping requests to responses and their semantics.
Referenced by OpenMote