Application protocols sit on top of TCP layer. They use TCP as a transport layer to communicate application specific messages. This section discusses some of the application protocols that can be used with embedded devices.
MQ Telemetry Transport (MQTT) is a lightweight message-oriented middleware (MOM) that is based on publish/subscribe model. The protocol is designed to be used for machine-to-machine communication that involves small data footprint. It works on the basis of hub/spoke topology. IoT devices are clients that connect to MQTT broker over the TCP protocol. The client devices subscribe to the messages published on a single or multiple topics. Topics itself can be structured hierarchically allowing to design an appropriate taxonomy specific to a particular domain, say home automation. MQTT broker supports multiple concurrent connections involving a large number of devices. This protocol is widely used in resource-constrained devices and networks where high bandwidth is an issue. Another variant is MQTT-SN that is designed to be used with sensor networks. It is applicable where data packet loss during transmission is not an issue. MQTT-SN works on a UDP transport.
The Constrained Application Protocol (CoAP), as the name suggests it is a protocol used with resource constrained devices and networks. The protocol is design to be used with machine-to-machine communication applications. It is modeled on the concept of HTTP (request/response) but uses low data footprint. Unlike HTTP, CoAP runs over UDP transport with broadcast and multicast feature. The protocol is used in a client-server model and supports REST style commands like GET, POST, PUT, and DELETE. There also exists HTTP-CoAP mapping that can be leveraged to communicate to CoAP devices using HTTP protocol. CoAP also supports asynchronous model involving message communication.
Advanced Message Queuing Protocol (AMQP) is another popular message-oriented middleware that has slowly made its place in the world of IoT. The protocol supports both queue based and pub/sub messaging model. The messages can be processed in a transactional context. The AMQP protocol operates on TCP transport and ensures reliable message delivery. Apart from reliability, AMQP is also interoperable. Disparate client systems with different software languages can interoperate with AMQ servers. From the IoT perspective, sensor devices that generate loads of data are streamed to AMQ servers (either in a raw or processed form), which is then consumed by receivers to perform monitoring and analytics.
WebSocket protocol supports a persistent connection between a client and the server over a single TCP connection. WebSocket protocol is used to facilitate near real-time communication and data transfer from and to the server without the client/server polling for data updates and transmitting relevant updates without an explicit request between client and server. In the context of IoT, WebSocket provides one of the alternative ways to provide real-time communication between devices and Cloud applications as compared to protocols like MQTT and AMQP.
AllJoyn is a collaborative open-source software framework that makes it easy for devices to discover, publish/broadcast itself and communicate with each other. AllJoyn was created to promote interoperability and seamless integration between devices and application through a set of core features. AllJoyn works across platforms that range from Android to iOS, Linux, OpenWRT Windows, OS X and embedded systems having limited memory and processing power capability.
Interoperability between devices and applications is the key to adoption and realization of a connected world and in future standards like AllJoyn would help bridge the interoperability gap.
Note – The AllSeen Alliance manages the AllJoyn open source project with software code using open standards to enable all the ‘things’ in the Internet of Things to work together. The initiative includes more than 170 member companies including leading consumer electronics manufacturers, home appliance makers, automotive companies, Internet of Things cloud providers, enterprise technology companies, innovative start-ups, chipset manufacturers, service providers, retailers and software developers.
DDS (Data Connectivity Standard) is part of OMG IoT standards, which enables network interoperability for connected machines, enterprise systems, and mobile device. DDS is a not a new protocol specification and was initially adopted for real-time communications. The DDS specification is available at http://portals.omg.org/dds/. DDS is used by many industries where real-time communication is required between systems. You can find the set of case studies at this link – http://portals.omg.org/dds/who-is-using-dds-2/