Overview of Networking and Messaging Protocols for IoT

Hello, Khabrovites! Russia’s first online course IoT developer starts at OTUS in October. Recruitment for the course is open right now, in connection with which we continue to share useful materials with you.


The Internet of Things (IoT, Internet of Things) will build on the existing network infrastructure, technologies and protocols currently used in homes / offices and the Internet, and will offer much more.

The purpose of this guide is to provide a brief overview of networking and application protocols for the IoT.

Note. You must have knowledge networking fundamentals

IoT networks

The IoT will work over existing TCP / IP networks.

TCP / IP uses a four-layer model with specific protocols at each layer. Cm. understanding the TCP / IP 4 layer model (we deal with the four-tier TCP / IP model).

The diagram below shows a comparison of the protocols currently in use and those most likely to be used for IoT.

Diagram Notes:

1. The font size reflects the popularity of the protocol. For example, on the left, IPv4 is larger as it is much more popular on the Internet today. However, it is smaller on the right as IPv6 is expected to be more popular in the IoT.

2. Not all protocols are shown.

3. Most of all changes at the channel (levels 1 and 2) and application levels (level 4).

4. The network and transport layers are likely to remain unchanged.

Link layer protocols

At the Data Link level, you need to connect devices to each other. They can be located both close, for example, in local networks (local networks) and at a great distance from each other: in metropolitan area networks and global networks (wide area networks).

Currently, Ethernet and Wi-Fi are used at this level in home and office networks (LAN), and in mobile (WAN) networks – 3G / 4G. However, many IoT devices are low power, such as sensors, and are powered only by batteries. Ethernet is not suitable in these cases, but low powered Wi-Fi and low powered Bluetooth can be used.

While existing wireless technologies (Wi-Fi, Bluetooth, 3G / 4G) will continue to be used to connect these devices, it is also worth looking into new technologies specifically designed for IoT applications, which are likely to grow in popularity.

Among them:

  • BLE – Bluetooth Low Energy

  • LoRaWAN – Long Range WAN

  • SigFox

  • LTE-M

They are described in more detail in the article An overview of IOT wireless technologies (overview of wireless IoT technologies).

Network layer

Networking will be dominated in the long term by protocol IPv6… It is unlikely that IPv4 will be used, but it can play a role in the initial stages. Most IoT devices for the home, such as smart bulbs, currently use IPv4.

Transport layer

At the Transport layer, TCP dominates the Internet and the web. It is used in both HTTP and many other popular Internet protocols (SMTP, POP3, IMAP4, etc.).

MQTT, which I expect will become one of the main application layer protocols for messaging, currently uses TCP.

However, in the future, due to lower overhead costs, I expect UDP to be more popular for the IoT. Probably more widespread MQTT-SNrunning on top of UDP. See article on comparison TCP vs UDP

Application Layer and Messaging Protocols

Important characteristics for IoT protocols:

  • Speed ​​is the amount of data transferred per second.

  • Latency is the time it takes to send a message.

  • Power consumption.

  • Safety.

  • Availability of software tools.

Currently, two main protocols are actively used at this level: HTTP and MQTT.

HTTP is probably the most famous protocol of this layer, the underlying web (WWW). It will continue to be essential for the IoT as it is used for the REST API, the main mechanism for communication between web applications and services. However, due to its high overhead, HTTP is unlikely to become the mainstream IoT protocol, although it will still be widely used on the Internet.

MQTT (Message Queuing Telemetry Transport) has become the main messaging protocol in the IoT due to its lightness and ease of use. See article Introduction to MQTT for beginners (An introduction to MQTT for beginners).

Comparison of HTTP and MQTT for IoT

MQTT is fast becoming the de facto standard for IoT applications. This is due to its lightness and speed compared to HTTP and the fact that it is a one-to-many protocol rather than one-to-one (HTTP).

Many modern web applications would happily use MQTT instead of HTTP if available at the time of their development.

A good example is sending information to multiple clients, such as train / bus / plane arrivals and departures. In this scenario, a one-to-one protocol such as HTTP has a large overhead and places a heavy load on the web servers. Scaling these web servers can be difficult. With MQTT, clients connect to a broker, which can be easily added for load balancing. Watch this video tutorial Republish HTML Data Over MQTT (Flight Arrivals Example) and article MQTT vs HTTP for IOT

Other messaging protocols

HTTP was not designed for IoT applications, but as mentioned, it will be widely used for some time due to its widespread use in API

Almost all IoT platforms support both HTTP and MQTT.

However, there are other protocols worth considering.

Protocols

  • MQTT – (Message Queuing Telemetry Transport). Uses TCP / IP. The publisher-subscriber model requires a message broker.

  • AMQP – (Advanced Message Queuing Protocol). Uses TCP / IP. Publisher-Subscriber and Point-to-Point Models.

  • COAP – (Constrained Application Protocol). Uses UDP. Designed specifically for IoT, uses a request-response model like HTTP. RFC 7252

  • DDS – (Data Distribution Service)

In this article discusses the main protocols and their applications. The conclusion of this article is that the IoT will use a set of protocols depending on their intended use.

However, if you look back, in the early days of the Internet, the then dominant HTTP protocol was just one of many protocols.

Although HTTP was not originally conceived for file and email transfers, today it is used for both.

I expect the same thing to happen with messaging protocols in the IoT: most services will use one dominant protocol.

Below are Google Trends charts showing how the popularity of MQTT, COAP and AMQP has changed over the past few years.

Google Trends Review

Protocol support by platform

  • Microsoft Azure – MQTT, AMQP, HTTP and HTTPS

  • AWS – MQTT, HTTPS, MQTT over websockets

  • IBM Bluemix – MQTT, HTTPS, MQTT

  • Thingworx – MQTT, HTTPS, MQTT, AMQP

Summary

Most of the changes are at the data link (levels 1 and 2) and application levels (level 4).

The network and transport layers are likely to remain unchanged.

At the application level, IoT components will use messaging protocols. While we are still in the early stages of IoT development, it is likely that one or possibly two messaging protocols will emerge.

Over the past few years, MQTT has become the most popular and that is what I am currently focusing on on this site.

HTTP will also continue to be used as it is already well built into existing IoT platforms.

That’s all. We invite you to sign up for a free demo lesson on the topic “Chatbot for quick commands to the device”

Read more:

  • Why unsecured consumer IoT systems are now a major business problem

Similar Posts

Leave a Reply

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