Near real-time communication
Internet of Things (IoT) is an interdisciplinary field that allows a wide range of devices, from the smallest sensors to industrial machines, to communicate and affect each other close to real-time. It has removed the dependency of processing data on a centralized server and replaced it with a more decentralized solution where each device can be considered a client as well as a server.
Traditionally, each device (or client) in a network could only initiate a connection to send or request data, whereas the server, or cluster of servers, only serve received requests from the devices. This is known as the request/response pattern and suffers from some significant drawbacks.
Chief among these is that in a system with sensors, actuators, and servers, the sensors and actuators can’t communicate directly with each other. In a simple example such as a sensor trying to change the state of some actuators, the sensor needs to send the request to the server first. Meanwhile, the actuators need to keep on polling the server to check if it needs to change its state. There are two disadvantages associated with this; firstly, there is a high risk that messages can’t be received by the server due to heavy load and time needed to process the requests. Secondly, actuators may use an unnecessary amount of bandwidth since they keep polling the server, even when nothing changes.