Many IoT (Internet of Things) projects fail due to unpredictable costs tipping the balance sheets. A major factor behind this, and one of the biggest contributors to the cost per device, simply boils down to the amount of data being transmitted. This cost that can be mitigated by choosing an efficient way of communicating between devices and applications. MQTT-SN (MQTT for sensor networks) is an optimized version of the IoT communications protocol. MQTT (Message Query Telemetry Transport) is designed specifically for efficient operation in large low-power IoT sensor networks.
When deploying networks that need to scale, cost is a significant factor. As the number of devices increases so does the overall cost of operation. This is due to many factors including the cost of the hardware itself but also less obvious, but equally impactful factors such as cost of data transmission, power supply costs as well as the cost of unreliable data. Together, these factors can create a problem which, if not addressed in the definition stages of an IoT project, could spiral out of control, leading to heavy data and power consumption costs further down the line as the network grows.
The benefits of digital transformation and adoption of an IoT network reveal themselves in many ways; greater business intelligence, process improvement, lower equipment maintenance costs and even new ways of generating revenue. These benefits are already being realized by many businesses so the trend for growth is set to continue. Gartner predicts that by 2020, there will be a total installed base of around 20.4 billion IoT devices worldwide with total spending on endpoints and services reaching $3.4 trillion.
While the benefits of IoT may be clear, the same cannot be said for costs associated with its deployment and subsequent operation. With each deployed device comes a host of costs; some of which are relatively predictable like the cost of the hardware itself. When it comes to the cost of operation, seemingly negligible factors, such as the amount of data transmitted and the amount of power used in doing so, can become major issues when scaled to hundreds or even thousands of devices. These issues are further compounded by the growing complexity and fragmentation of the IoT ecosystem. Whatever the application, there are many different ways to gather data from and push instructions to devices and each method brings with it different challenges and subsequently different costs.
One of the biggest costs faced by large-scale IoT networks is the cost of the data transmission itself. With thousands of devices producing potentially millions of messages per year, seemingly small, per-message costs soon add up. This also correlates with the amount of power used to communicate data. For these reasons, it’s imperative that as little data as possible is transmitted and is only sent when needed.
Reducing the cost per device and the total cost of operation can be achieved by reducing the amount of data transmitted. This can be fixed in part by processing data at the edge of the network and only transmitting data when it is needed. However, for any data that needs to be sent, size is still a problem, specifically where remote wireless networks are concerned.
Another approach to the data problem is to pick a messaging standard which inherently produces small messages. Various messaging protocols are available for IoT and depending on the application, vary in their suitability. Popular IoT protocols such as DDS (Data Distribution Service) and XMPP (Extensible Messaging and Presence Protocol), for example, might be good for sending lots of data where processing power and data are abundant, but due to large message sizes and heavy processing, they are far from ideal for use in many large-scale deployments.
MQTT is a lightweight machine to machine (M2M) messaging protocol which, due to a very small code footprint and small message size, is ideal for large-scale networks, particularly where network bandwidth is lacking. MQTT can also help to reduce layers of technology and integration. It does this by removing the requirement to translate data between different components as well as removing the need to use third-party middleware for communication between devices and the IoT platform.
MQTT-SN is a variant of MQTT designed specifically for wireless sensor networks with scale in mind. The standard further improves efficiencies in both data transmission and power consumption. Added efficiencies include shortened topic IDs which reduce the size of the topic ID by converting it from a string to a two-byte alias, thus reducing message size. The smaller topic ID can be achieved by an added “register” function which allows the client to register an alias with the gateway for messages going forward. On top of this, shorter topic IDs can be programmed into the device and gateway to ensure that both entities already know the ID without needing to register, thus cutting out the need for extra control messaging. MQTT-SN also features a keep-alive procedure which allows devices to go to sleep when they are not needed and receive any information waiting for them when they wake up.
If you are considering a major IoT project then consider MQTT. It is very well suited to use in IoT as it is one of the most commonly-used protocols (used by some of the biggest platforms such as IBM Watson IoT and Microsoft Azure) and devices that use MQTT are likely to easily sync with your existing systems.
Lee Stacey is chief noisemaker and product evangelist at Thingstream. Thingstream removes the complexity of creating and managing your remote industrial IoT applications. It combines connectivity and application management into a unique single platform. Lee has 25 years of experience working with technology-based companies ranging from regional SMEs to global enterprises.