IoT and Protocols – A Shallow Dive!

Target Audience :

Solution architects, Enterprise architects solution designers and CXOs who are all involved in building IoT based applications.
Reading time: 10 Minutes

It is more important to understand about IoT with detailed focus because of the below facts:
1. It is highly hyped topic for last two years 2014, 15 and become a buzz word.
2. IoT has long tail of applications
3. IoT has multiple platforms and everyone claims to be best.
4. It offers huge opportunities
5. It poses same amount or more challenges that of opportunities

If I take an analogy to explain this concept, this is something similar to “Life of Pi
Pi patel — Business Enterprises
Richard Parker (Tiger) –> IoT

Similar to Pi Patel, we are in a situation not to just ignore IoT – Only option available to Pi is tame the tiger , analogous we need to understand more about IoT and control it.

>>> There is sea of opportunities if we are able to tame the tiger( IoT)
>>> To control and tame , One needs to know more about IoT like challenges, problems, behavior etc..,
>>> It is important How tiger (IoT) communicates

Life Of Pi
Life Of Pi

Before knowing more about IoT, Let us understand that there are so many IoT platforms available to choose from, Given below is the indicative list

IoT Platforms
IoT Platforms

In other words, everyone in the IoT ecosystem already putting efforts to build their own platforms.

IoT Ecosystem
IoT Ecosystem

In this blog, let us take the important aspect of whole IoT ecosystem, which is “Connectivity” .

Most of IoT depends on connectivity and how communication happens between Things and cloud. One side, Cloud side connection is almost fixed – Http or https using REST calls. Hence it is critical or differentiation of platform happens only on the other side, that is, how IoT system communicates with devices/things.

Main protocols used are
1. MQTT
2. CoAP
3. AMQP
4. XMPP

Before understanding these protocols, let us get back to Basics of network Protocols – OSI defines 7 layers
and Network is one part of it.

OSI Layers
OSI Layers

Under transport protocol we have two options use of TCP or UDP. Both are used for different purposes. Both have their benefits and constraints. In case of IoT, use of these protocols makes difference between platforms.

Let us know more about TCP and UDP.
TCP is more common and widely used in Worldwide Web, Email, FTP, SSH
UDP is used in special occasions where fast transfer is preferred like DNS , streaming media applications and Games.
Below table explains the differences between TCP and UDP

TCP vs UDP
TCP vs UDP

In simpler terms, reliability Vs fast determines the protocol usage.
To understand even better, let us know headers details of TCP and UDP.

TCP vs UDP
TCP vs UDP

Additional parameters like sequence number and acknowledgement number makes TCP more reliable while UDP header size being small enables quicker transmission.

Having understood TCP and UDP, let us come back to different protocols used in IoT platforms.

CoAP :

Constrained Application Protocol is a software protocol that was designed to support the connectivity of simple low power electronic devices (e.g. wireless sensors) with Internet based systems. The Internet Engineering Task Force (IETF) Constrained Restful Environments (CoRE) Working Group is currently working on standardizing CoAP. It is a document transfer protocol like HTTP. Clients and servers communicate through connection-less datagrams. Retries and reordering are implemented in the application stack

MQTT:

Message Queue Telemetry Transport is a publish/subscribe messaging protocol designed for lightweight M2M communications. It was originally developed by IBM and is now an open standard. MQTT gives flexibility in communication patterns and acts purely as a pipe for binary data.

XMPP:

Extensible Messaging and Presence Protocol (XMPP) is a communications protocol for message-oriented middleware based on XML (Extensible Markup Language). Originally named as jabber

AMQP :

Advanced Message Queuing Protocol, was designed as an open replacement for existing proprietary messaging middle ware. Two of the most important reasons to use AMQP are reliability and interoperability. It provides a wide range of features related to messaging, including reliable queuing, topic-based publish-and-subscribe messaging, flexible routing, transactions, and security. AMQP exchanges route messages directly—in fanout form, by topic, and also based on headers.

IOT primer provided the comparison of these protocols:

IOT Protocols
IOT_Protocols

To explain the protocols, Let me take few famous products

CoAP and MQTT is used by ARM based chip sets in mBed architecture

CoAP_MQTT

XMPP is used in Bosch IoT suite – Message oriented, TDP based, TLS security

XMPP
XMPP

MQTT used by IBM IoT Bluemix message oriented, TCP based, TLS security

Microsoft Azure uses AMQP

AMQP
AMQP

Axeda uses proprietary protocol AMMP (Adaptive Machine Messaging protocol)

Google has come up with one more protocol Weave(used by Brillo) to the myriad of standards and protocols.
Currently no detailed information available.

Weave
Weave

Depending on the following conditions of the IOT use case, determine the right protocol and corresponding platform.

1. Need for Fast response time
2. Number of devices – large or small
3. Security requirements (TLS or DTLS)
4. Reliability of the use
5. Open standards (Proprietary protocols may pose additional challenges)

Tags:, , , ,
One Comment

Add a Comment

Your email address will not be published. Required fields are marked *