MQTT-S publish/subscribe middleware for wireless sensor systems
Considerable research and development work has been invested to support the operation and maintenance of wireless sensor and actuator networks (WSANs). The main attention is usually focused on energy consumption and low-power operation, and on such networking issues as routing and multi-hop / mesh functionalities. Equally important but much less studied are "higher-level" issues related to network deployment, interworking, and the integration with existing networks. Of particular interest here is the choice of a suitable communication middleware that hides the complexity of the low-level networking protocols and facilitates the development of applications. In this context the data-centric communication approach, which is based on data content rather than receivers' addresses, appears to be both more efficient and more appropriate for WSANs.
One form of data-centric communication is publish/subscribe messaging, which is widely used in enterprise networks, mainly because of its scalability and support of dynamic application topologies. Thus, extending publish/subscribe systems into sensor networks will simplify their integration with other distributed applications.
The publish/subscribe messaging model consists of a number of publishers and subscribers connected to a broker, see Figure 1. Publishers send (publish) messages to the broker on a specific "topic" (similar to the subject of an e-mail). Subscribers register (subscribe) their interest in certain topics with the broker. The broker manages the connections to the publishers and subscribers and distributes the messages it receives from the publishers to the subscribers according to their subscribed topics.
We have developed and implemented a lightweight publish/subscribe protocol called "MQ Telemetry Transport For Sensors" (MQTT-S), which is an extension of the open-MQTT protocol used by IBM for the integration of remote monitoring and control devices into the enterprise network. MQTT-S is designed specifically to operate on low-cost and low-power sensor devices and to run over bandwidth-constrained wireless networks. Using MQTT-S wireless sensor devices can easily be integrated into IBM WebSphere solutions so that the devices and the data are accessible anytime, anywhere, and from any application. MQTT-S also facilitates the deployment and interworking of multiple and heterogeneous sensor networks.
The architecture of MQTT-S is shown in Figure 2. An MQTT broker provides pub/sub services to the MQTT-S clients located on the sensor network. In general, an MQTT-S client contains both a publisher and subscriber and accesses the services of the broker via either a gateway (GW) or a forwarder (FW). Whereas the main function of a forwarder is to transfer, without any modifications, the MQTT-S messages it receives on one network to the other one, a gateway also performs a translation between the MQTT and MQTT-S protocols. Therefore a forwarder has to use the translation service of a gateway to be able to talk to the MQTT broker. One feature of MQTT-S is to support multiple gateway / forwarders, thus providing load sharing and redundancy services to clients. This feature is particularly advantageous for wireless networks with low bandwidth and high link failure rates. Another important design point of MQTT-S is its network independence, i.e., it can operate on any network technology that provides a datagram service. Thus, MQTT-S can be used not only to interconnect isolated wireless sensor networks, but also as a bridge between networks of different types, e.g. ZigBee networks with TinyOS networks. Furthermore, MQTT-S operates equally well over best-effort UDP or reliable, session-oriented TCP transport services.
Like MQTT, the detailed specification of MQTT-S is open and available at mqtt.org.
- U. Hunkeler, H. Truong, and A. Stanford-Clark, "MQTT-S: A Publish/Subscribe Protocol for Wireless Sensor Networks," in Proc. Workshop on Information Assurance for Middleware Communications (IAMCOM), 2008.