Many IoT (Internet of Things) projects fail due to unpredictable costs tipping the balance sheets. A major factor of this and one of the biggest contributors to the cost per device simply boils down to the amount of data being transmitted – a cost that can be mitigated, at least in part, by choosing an efficient way of communicating between devices and applications. MQTT-SN (MQTT for sensor networks) is an optimised version of the IoT communications protocol, MQTT (Message Query Telemetry Transport), designed specifically for efficient operation in large sensor networks.
The hidden cost of IoT at scale
When deploying networks that need to scale, the cost is a significant factor. As the number of devices increases so does the overall cost of operation. This is down to many factors including not only 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.
Clear Benefits Vs. Unclear Costs
The benefits of digital transformation and adoption of an IoT network come in many forms, including greater business intelligence, process improvement, lower equipment maintenance costs and even new ways of generating revenue. These benefits are already being realised by many businesses and, as such, 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 come a host of costs; some of which are relatively predictable like the cost of the hardware itself but 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.
The issues above 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.
Cost-effective scale with MQTT-SN
One of the biggest costs faced by large-scale IoT networks is the cost of the data transmission itself. With thousands of devices and 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 that as little data is transmitted as possible and is only sent when it’s needed.
Reducing the cost per device and, subsequently, 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 the 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 works on a publish and subscribe basis, which means that rather than devices and applications talking directly to each other on the network, they publish to a topic and anything subscribed to that topic will then receive the published message. This system makes it easy to implement one-to-many or many-to-one messaging. MQTT also features built-in QoS (Quality of Service) which can bolster network reliability by making sure that important messages always get to where they need to go.
Benefits of MQTT-SN
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.
It’s imperative that the costs associated with the deployment of an IoT network are fully established and understood at the definition stage. Adopting a low-power, low-bandwidth messaging protocol such as MQTT-SN can significantly reduce the cost per device by reducing the amount of data transmitted by orders of magnitude – gigabytes become kilobytes and kilobytes become bytes – thus reducing long-term costs and the total cost of the project by reducing data and power costs significantly.