Making Sense of IoT Sensors, MQTT, and Streaming Data

With the use of IoT sensors on the rise, one of the great challenges companies face is finding a protocol that's both compact and robust enough to meet a variety of requirements...

With the use of IoT sensors on the rise, one of the great challenges companies face is finding a protocol that’s both compact and robust enough to meet a variety of requirements. IoT devices oftentimes need to be able to communicate on a machine-to-machine (M2M) basis, and they also need to transmit information to servers, analytics platforms, and dashboards. Similarly, they may need to provide streaming data to all of these platforms.

One solution many organizations have settled on is Message Queuing Telemetry Transport (MQTT). Created by IBM in 1999, MQTT is a very mature protocol compared to other available options. Let’s take a look at why MQTT is a strong candidate for widespread adoptions over the coming decade and some of its best use cases.

What’s in a Protocol?

It may be helpful to think generically about what makes a transport protocol ideal for deployment in IoT sensors and devices. Qualities worth including in such a protocol include:

  • Very low power consumption
  • A light code footprint that can be adapted to many small devices
  • Minimal bandwidth usage
  • Low latency
  • Compatibility with a wide range of public clouds
  • A simple publication and subscription model

MQTT ticks all the boxes, providing support to a variety of major platforms. It was originally intended to allow oil pipeline systems to communicate with satellites. Deployed in sometimes difficult conditions, MQTT is built to keep power and bandwidth requirements minuscule. It also offers robust library support for popular programming languages like Python.

How MQTT Works

A publication and subscription model is the core of MQTT. Individual devices are set up as clients, but the central systems they communicate with are considered brokers rather than servers. If a client wants to send information out, it will publish the data to a topic. The broker then sends the information to all other clients that have subscribed to receive publications on the topic.

This is ideal for use with sensors because they don’t need to know anything about what’s occurring upstream. Also, all clients on the network have the capacity to be publishers and subscribers. They simply check in with the broker to find out what’s new.

Using MQTT with Streaming Data

IoT devices oftentimes use fire-and-forget solutions to minimize bandwidth and power consumption. For example, a Raspberry Pi might be set up as a monitoring station in a cornfield to provide data regarding things like air and soil temperatures, humidity, hydration, and pH levels. In the simplest form, the farmer’s data dashboard is just one more client in the network. Each of the sensors publishes data, and the dashboard, acting as just another client, subscribes to the topics from all of the sensors.

The beauty of this system is fairly self-evident. No one has to deal with massive server-client infrastructure. The farmer can easily have clients set up on a cellphone, tablet, in-vehicle display and laptop. Information is available everywhere and at all times, and this is all accomplished with little power consumption, a light central broker, and minimal bandwidth consumption. This represents a very lean approach to streaming data.

Two Use Cases

Logistics firms frequently use MQTT to track fleets and shipments. A system using MQTT can connect sensors in planes, trains, trucks and cars with a company’s existing backend for analytics and storage. Likewise, computers and mobile devices can bypass the cumbersome backend by talking directly to the MQTT system, providing nearly real-time information.

Despite its rather heavy-duty industrial pedigree, MQTT has found its way into a surprising variety of applications, too. For example, MQTT is a core component of Facebook Messenger. The company elected to use MQTT because its low power consumption helped it preserve battery life on mobile devices.

Conclusion

Having a lightweight protocol is essential to maximizing the efficiency and effectiveness of IoT devices and sensors. MQTT is one of the more appealing options for companies that need to prioritize speed and simplicity. If you’re preparing to deploy or upgrade a network of IoT systems, MQTT will be one of the options on your shortlist when it comes to choosing a protocol.

Author

Picture of Scottie Todd

Scottie Todd

Digital Marketing Lead

“Level 4 marketing wizard on a quest for
data insights one blog post at a time.”

Subscribe

Polk County Schools Case Study in Data Analytics

We’ll send it to your inbox immediately!

Polk County Case Study for Data Analytics Inzata Platform in School Districts

Get Your Guide

We’ll send it to your inbox immediately!

Guide to Cleaning Data with Excel & Google Sheets Book Cover by Inzata COO Christopher Rafter