Edit This Guide Record
Guides Technology Internet of Things (IoT) Application Protocols

Internet of Things (IoT) Application Protocols

Published on 12/01/2016 | Technology

6187 3

Narsimhmaswamy Badugu

Software Engineer. HCL Technologies

IoT GUIDE

Overview

How billions of things will communicate?

Internet of Things (IoT) is an environment of constrained devices which are Always, Anywhere and Anytime connected with each other and sending data or information which can be further processed over cloud to generate analytic result which can be used to automate an action.

Click here for an infographic on the projected number of connected devices in 2020.

According to the Gartner reports in 2020, Over 25 billion connected devices will be in use.

As the number of devices connected to the internet are increasing exponentially the big question arises how these constrained devices/things will communicate with other things and send data through network in a very short period of time and also securely?

The answer is use of communication protocols (Application layer protocols in IoT protocol stack) and selection of communication protocols will plays a crucial role in Internet of Things (IoT).

Factors to be considered

Following are the prime factors that must be consider to select appropriate communication protocol for your application.

- Minimum packet size.

- Highly secure.

- Information delivery assurance.

- Less connection and transfer time.

- Should operate at lower bandwidths.

- Consumes less power.

Now let’s have a look at various IoT application protocols, its features, architecture and industry expert’s choice.

MQTT (MQ Telemetry Transport):

MQTT (MQ Telemetry Transport or Message Queuing Telemetry Transport) is a Client Server publish/subscribe messaging transport protocol was invented by Dr Andy Stanford-Clark of IBM, and Arlen Nipper of Arcom (now Eurotech), in 1999 and now it is an Open source, OASIS standard.

It is light weight, open and simple protocol.  

These characteristics make it ideal for use in many situations, including constrained environments such as for communication in Machine to Machine (M2M) and Internet of Things (IoT) contexts where a small code footprint is required and/or network bandwidth is at a premium.

The protocol runs over TCP/IP network protocol that provide ordered, lossless, bidirectional connections.

 Three Qualities of Service (QoS) for message delivery:

  "At most once", where messages are delivered according to the best efforts of the operating environment. Message loss can occur. This level could be used, for example, with ambient sensor data where it does not matter if an individual reading is lost as the next one will be published soon after.

"At least once", where messages are assured to arrive but duplicates can occur.

"Exactly once", where message are assured to arrive exactly once. This level could be used, for example, with billing systems where duplicate or lost messages could lead to incorrect charges being applied. 

MQTT Publisher - a sensor or device in IoT that publishes a piece of information.

MQTT Subscriber – anything which is interested in subscribing and receiving a piece of information. It could be a smartphone, a wearable device, or even other devices that are interested to know about other devices around and change themselves according to the other events.

MQTT Broker – An intermediary that receives information from publisher and forwards them to the subscribers.

At an another protocol, MQTT-SN (MQTT for Sensor Networks) protocol is a version of MQTT which runs over UDP is specifically designed to meet the requirements very constrained devices where less usage of power and memory are primary concerns.

MQTT-SN is a pub/sub protocol for wireless sensor networks.

CoAP (Constrained Application Protocol):

The CoAP protocol was designed by the Constrained RESTful Environments (CoRE) working group of IETF.

It is the Web of Things protocol.

CoAP is designed to easily translate to HTTP for simplified integration with the web, while also meeting specialized requirements of constrained devices.

CoAP provides Datagram Transport Layer security (DTLS), like HTTP it is also a document transfer protocol.

The protocol runs over UDP network protocol that provide ordered, faster bidirectional connections.

Two Qualities of Service (QoS) for information delivery:

Conformable Messages.

Non-conformable messages.

CoAP protocol is a request/response model where each device acts as “client” or “server” and it is running over UDP transport protocol.

CoAP can’t replace HTTP in general, here the main aim is to reduce the number of bytes required for the transmission of data in cases of constraint applications such as especially in IoT.

AMQP (Advanced Message Queuing Protocol):

The Advanced Message Queuing Protocol (AMQP) is an open standard application layer protocol for message-oriented middle ware.

Developed by John O’Hara from JP Morgan and first used in production in 2006, AMQP set out to address the problem of interoperability by creating a standard for how messages should be structured and transmitted between platforms.

The features of AMQP are message orientation, queuing, routing (including point-to-point and publish-and-subscribe), reliability and security.

The protocol runs over TCP/IP network protocol that provide ordered, lossless, bidirectional connections.

Three Qualities of Service(QoS) for message delivery:

"At most once", where messages are delivered according to the best efforts of the operating environment. Message loss can occur.

"At least once", where messages are assured to arrive but duplicates can occur.

"Exactly once", where message are assured to arrive exactly once. 

Publisher - a sensor or device in IoT that publishes a piece of information.

Exchangers - used to route the messages to appropriate queues. Routing between exchanges and message queues is based on some predefined rules and conditions. Messages can be stored in message queues and then be sent to subscribers.

Subscriber – anything which is interested in subscribing and receiving a piece of information.

XMPP (Extensible Messaging and Presence Protocol ):

Extensible Messaging and Presence Protocol (XMPP) is a communications protocols for message-oriented middleware based on XML (Extensible Markup Language).

Originally named Jabber, the protocol was developed by the Jabber open-source community in 1999 for near real-time instant messaging (IM), presence information, and contact list maintenance. Designed to be extensible , the protocol has been used also for publish-subscribe systems, signaling for VoIP, video, file transfer, gaming, the Internet of Things (IoT) applications. 

Many XMPP features make it a preferred protocol by most IM applications and relevant within the scope of the IoT.

XMPP is secure and allows for the addition of new applications on top of the core protocols.

The protocol runs over TCP/IP network protocol that provide ordered, lossless, bidirectional connections. 

XMPP connects a client to a server using a stream of XML stanzas. An XML stanza represents a piece of code that is divided into three components: message, presence, and iq (info/query).

Message stanzas identify the source (from) and destination (to) addresses, types, and IDs of XMPP entities that utilize a push method to retrieve data. A message stanza fills the subject and body fields with the message title and contents.

Conclusion

Each IoT application protocol has its own certain benefits and issues. The selection of application protocol is completely depends on the application, if the requirement is sending some piece of information constantly, then MQTT like protocols are preferable whereas if document transfer is required, then CoAP protocol is preferable.

The two messaging protocols MQTT and CoAP are emerging as leading lightweight messaging protocols in IoT market.

Finally, due to the availability of MQTT libraries in most of the programming languages, because of its light weight and delivery assurance, industry giants are actively supporting and promoting MQTT protocol. As a result, today MQTT is available in almost all cloud services and it is the preferred IoT application protocol.

This article was originally posted on LinkedIn.

test test