Database Reference
In-Depth Information
middleware for getting information from sensor clouds, i.e., a platform for
“Sensing-as-a-Service.”
As the IoT is characterized by an enormous-scale interconnection of het-
erogeneous devices operating in highly dynamic environments, the adoption of
standard communication protocols and open-source development platforms and
tools (e.g., operating systems and software libraries) can foster the widespread
adoption of IoT-based Smart-X applications. For these reasons, in this work
we present mjCoAP , an open-source lightweight Java implementation of CoAP.
With respect to other state-of-the-art implementations, the mjCoAP library fea-
tures a small footprint and is compatible with any Java-enabled devices running
either J2SE, J2EE, J2ME/Embedded Java platforms, thus making it suited to
being used on a wide range of devices.
The rest of this work is organized as follows. Section 2 discusses the details of
the CoAP protocol and some of its extensions. In Sect. 3 , an overview of CoAP
implementations is presented. In Sect. 4 , we present the architecture and details
of the mjCoAP library. Section 5 presents some application scenarios based on
mjCoAP. Finally, in Sect. 7 , we draw our conclusions.
2 Constrained Application Protocol
In order to deal with packet loss and subsequent retransmissions, applications
running in constrained environments, such as LLNs, should send the fewest
amount of data and application-layer protocols should introduce as little over-
head as possible. Application-layer protocols should be designed by taking into
account the requirements of low overhead deriving from lower layers. CoAP is
a standard application-level protocol for bringing the RESTful paradigm into
constrained applications. CoAP is a lightweight binary protocol that can be
mapped easily to HTTP and therefore it can integrate with the Web. Moreover,
CoAP meets several constrained application requirements, enhancing the capa-
bilities of HTTP, by supporting multicast communications, resource observing,
and service discovery. CoAP uses binary messages, which are used to embed
mandatory fields (Version, Type, Token, Code, Message-ID) and optional fields
(CoAP Options and Payload), designed to keep their size as small as possible.
The semantics of CoAP requests and responses are carried in the messages.
Similarly to HTTP headers, a CoAP message can contain additional informa-
tion embedded in specific “ options ,” which can be used to better instruct the
endpoint of the communication of how to process the message.
2.1 CoAP Messaging
CoAP implements a request/response (client/server) communication model on
top of UDP. The use of UDP instead of TCP has several reasons: (i) it is a
small-overhead transport protocol introducing only an 8-byte header; (ii) it does
not require a connection to be setup between the endpoints of communication;
Search WWH ::




Custom Search