What is IoT messaging?
In previous article we saw what Internet of Thing really is and why IoT is becoming popular and its growth factors. In this article we will see IoT Messaging and different types of messaging and what is gateway and what type of gateways is available for IoT solution.
Now that we defined what internet of things is and how we can use and why it is beneficial, let's move into more specific of building IoT solution and the first one here is talking about internet of things messaging.
There is two different type of messaging in the cloud with internet of things.
We have device to cloud messaging which allows you to send telemetry or messages from IoT device up into the cloud such as sensor reading, temperature, humidity, motion sensor and other type of sensors. This lets you feed the data into a message queue for processing later on down to the path.
There is cloud to device messaging which allows you to send messages from the cloud down to the device. These are often command and control messages like turn on and off the collection of telemetry, enable the device, shut down the device and different things like that that controls what the device does.
Here is an example of better visualized two-way messaging of IoT solution.
So this is a sample of smart thermostat example that demonstrates how two-way messaging IoT works. In step one, the thermostat might send current temperature data up into the cloud. This would be an example of the device to cloud message sending that temperature telemetry.
Step two, the user then can use application on the mobile device, web application something like that to see the current temperature and what is been reported to the cloud. May be it is too cold and the user wants to set a new temperature that they want within the app that tells the thermostat. So he sets that in the app, it would send that message to the cloud
Step three, the service in the cloud uses cloud to device messaging to send that command and control message down to the thermostat to go and change it to the new temperature.
IoT message communication is enabled through the messaging protocol.
The MQTT or message queue telemetry transport protocol is a messaging protocol which is specifically designed for IoT use. It is a light way and simple protocol and it supports both publish and subscribe messaging enabling it to be used with two way messaging scenarios.
MQTT was also designed to minimize bandwidth which can be useful for high message volume and throughput scenarios as well as helping keep resource requirement down on maybe lower power devices.
There are also additional protocols which can be used for internet of things solution.
The AMQP advanced message queuing protocol is an industry standard message queue protocol and it is used with message queue but it can also be used with internet of things scenarios. Even AMQP does not support publish subscribe model it still can be useful.
There are also protocols like standard web protocol http or https as well as messaging protocols like XMPP or other legacy protocols or device specific messaging protocols.
To continue talking about messaging we also need to talk about IoT gateways.
When connecting multiple IoT devices to a solution, there can be times when connecting individual devices up to the cloud can be problematic. IoT gateways are built to provide solution to this. An IoT gateway can provide an aggregation point for multiple devices to connect through and communicate with the cloud through the IoT gateway. It is similar to a proxy.
There are two types of IoT gateways:
The first type is Field Gateway which can be helpful on connecting low power or simple devices. One scenario this can specially be helpful is when the device may not be capable of encryption such as SSL or TLS.
Second is a protocol gateway which is helpful on providing protocol adaptation. Protocol gateways can be useful when device does not support certain protocol which the cloud services support. In this case protocol gateway is used to translate the communication from the device's protocol to one supported by the cloud services. This can be used for a proprietary protocol being translate to MQTT for example.
Here is an example of kind of how gateways fit in.
On the left side we have our devices and on the right side we have our cloud connectivity service. On the top we have IP-capable devices that IoT client running. These devices can directly be connected to the cloud service our cloud gateway or messaging hub.
We may have existing IoT devices that can be connect directly or possibly through a gateway that can do that. Protocol adaptation and adding encryption are different actions that the gateway could provide and then in the bottom you see the low-power devices. These are may be the devices that don't have the ability to do encryption or they may not have enough power to constantly be connected to an IoT network and connect up to the internet and then you may connect those to the gateways.
With the internet of things solutions as well as many big data scenarios there are concepts of hot and cold message processing.
Fast or hot message processing is when IoT data or messages are processed in real time. This can be used to perform analytics and discover intelligence on event data in real time for actions of notifications that to be performed as the data is flowing to the system
Slow messaging processing or cold message processing is when IoT data or messages processed later on, sometimes nightly, monthly or on other schedule on demand even. This can be used for analytics and discover intelligent on event data using delayed or batch process. The slow processing can be useful in analyzing data after the fact for reporting and other types of analytics.
There are times when both the fast and slow message processing are needed within the same solution. So rather choosing one or the other you can actually choose both of these simultaneously in your solution through the use of lambda architecture.
Lambda architecture allows you to essentially split off your event data stream in a two path.
Data will come from your devices up into the cloud solution up into the cloud gateway or message hub and it will be split off to the fast path for real time processing and analytics and also funnel off to the slow path to be use for archive storage or batch processing or future reporting use at a later time.
This way you can have a same data funnel through both path simultaneously offering the capabilities that needs to be implemented with both flow and fast processing to be implemented within your exact same solution.
With Lambda architecture you have all of data from your IoT devices flowing down both fast and slow path simultaneously.
Your IoT solution then can perform any necessary processing, analytics and storage where it is appropriate without compromising by requiring to you to choose one or the other.
Number of Views:1612