
MQTT-S – A Publish/Subscribe Protocol For Wireless Sensor Networks Urs Hunkeler & Hong Linh Truong Andy Stanford-Clark IBM Zurich Research Laboratory, Switzerland IBM UK Laboratories, Hursley, UK Email: {hun,hlt}@zurich.ibm.com Email: [email protected] Abstract—WirelessSensorNetworks(WSNs)posenovelchal- lenges compared with traditional networks. To answer such challenges a new communication paradigm, data-centric commu- nication, is emerging. One form of data-centric communication is the publish/subscribe messaging system. Compared with other data-centric variants, publish/subscribe systems are common and wide-spread in distributed computing. Thus, extending publish/subscribe systems into WSNs will simplify the integration of sensor applications with other distributed applications. This paper describes MQTT-S [1], an extension of the open pub- lish/subscribe protocol Message Queuing Telemetry Transport (MQTT) [2] to WSNs. MQTT-S is designed in such a way that it can be run on low-end and battery-operated sensor/actuator Fig. 1. Integrated Wireless Sensor Networks devices and operate over bandwidth-constraint WSNs such as ZigBee-based networks. Various protocol design points are dis- cussed and compared. MQTT-S has been implemented and is traditional network. Our work on the IBM wireless sensor net- currently being tested on the IBM wireless sensor networking testbed [3]. Implementation aspects, open challenges and future working testbed [3] have shown that even in a static network work are also presented. some networking protocols (e.g., ZigBee) change the device address from time to time. In such situations, the conventional I. INTRODUCTION approach of using network addresses as communication means In the past few years, Wireless Sensor Networks (WSNs) between the SA devices and the applications may be very have been gaining increasing attention, both from commercial problematic because of their dynamic and temporal nature. and technical point of views, because of their potential of Applications requiring interactions with the wireless SA de- enabling of novel and attractive solutions in areas such as vices would need to manage and maintain the addresses of industrial automation, asset management, environmental mon- alargenumberofnodes.Inmostcasestheydonotneed itoring, transportation business, etc. Many of these applications to know the address or identity of the devices that deliver require the transfer of data collected by the sensors to applica- the information; they are more interested in the content of tions residing on a traditional network infrastructure (e.g In- the data. For example, an asset-tracking application is more ternet, LAN, enterprise network, etc.). Thus the WSNs need to interested in the current geographical location of a certain asset be integrated with these traditional networks. Figure 1 shows than in the network address of the GPS receivers that deliver the typical structure of such an integrated network, in which this information. Moreover, several applications may have an gateways are used to connect multiple WSNs to a traditional interest in the same sensor data but for different purposes. In network. Within the WSNs, a large number of battery-operated this case, the SA nodes would need to manage and maintain Sensor/Actuator (SA) devices, usually equipped with a limited communication means with multiple applications in parallel. amount of storage and processing capabilities, collect informa- This might exceed the limited capabilities of the simple and tion about their environment and send them to the gateways for low-cost SA devices. further transfer to the applications. Even for networks without The problem described above can be overcome by using a actuators, information also flows in the opposite direction, data-centric communication approach [4], in which informa- e.g., for sensor management and configuration as well as for tion is delivered to the consumers not based on their network software updates. addresses, but rather as a function of their contents and The entire network is very dynamic. On the WSN side, interests. Publish/Subscribe (pub/sub) messaging systems [5] SA devices may change their network addresses at any time. are well-known examples of data-centric communication and Wireless links are quite likely to fail. Furthermore, SA nodes are widely used in enterprise networks, mainly because of could also fail at any time, and rather than being repaired, it is their scalability and support of a dynamic application topol- expected that they will be replaced by new ones. Applications ogy. These features are achieved by decoupling the various can be hosted and run on any machines anywhere in the communicating components from each other such that it is easy to add new data sources/consumers or to replace existing user is interested in. TinyDB even allows the aggregation of modules [6]. data inside the network. On the other hand, TinyDB is not a This paper describes the pub/sub protocol MQTT-S [1]. general-purpose communication platform but rather a querying MQTT-S is an extension of the open publish/subscribe pro- system for sensors. To implement a general-purpose content- tocol Message Queuing Telemetry Transport (MQTT) [2]. It based publish/subscribe system, the data has to be augmented is designed especially for operation on low-cost and low- with meta-data to identify the different data fields. We believe power SA devices and running over bandwidth constrained that adding such meta-data incurs too high an overhead for WSNs such as ZigBee [7] or TinyOS [8] based networks. the very constrained platforms we target. ZigBee [9] is an open and global communication standard for WSNs. ZigBee is based on the IEEE 802.15.4 standard [10] for wireless personal area networks (WPANs). It adds on top on this standard the required network, security and application layers, thus providing interoperability between products from different vendors. The processing and storage capabilities of the SA devices are assumed to be equivalent to the original Berkeley Mica mote [11]. Our solution not only provides a Fig. 2. Topic-based Pub/Sub Communication Model simple but scalable communication means for interacting with alargenumberofSAdevices,butalsoenableaseamless Owing to its simplicity when compared with the other types integration of the WSNs into traditional networks. of pub/sub systems, we believe that topic-based systems are We begin with an overview on what a pub/sub messaging most appropriate for WSNs based on hardware similar to system is and which advantages it provides for WSNs. In the original Berkeley mote [11]. The communication model Section III we then briefly present pub/sub protocols already of a topic-based pub/sub system is shown in Figure 2. A known in the area of sensor networks, with special focus on the subscriber sends a sub(topic) message to inform the broker open protocol MQTT [2]. MQTT-S is then described in Sec- of its interest in the indicated topic,whereasapublisher tion IV, with a discussion of the most important design points. sends a pub(topic,data) message which contains the data to be Our implementation of MQTT-S is presented in Section V. published together with the related topic.Ifthereisamatch Open challenges and future work are presented in Section VI, between the publisher’s and the subscriber’s topics, the broker and the conclusions are given in Section VII. transfers the pub(topic,data) message to the subscriber. A single pub message may be distributed to multiple subscribers II. PUBLISH/SUBSCRIBE SYSTEMS if its topic matches the topics of these subscribers. The principle of the publish/subscribe (pub/sub) commu- Figure 3 shows the resulting architecture of the same nication model is that components which are interested in integrated network as the one in Figure 1, when a pub/sub consuming certain information register their interest. This system is used as communication middleware. A broker is process of registering an interest is called subscription, the introduced in the traditional network, and all other components interested party is therefore called a subscriber.Components are connected to it and communicate with each other using the which want to produce certain information do so by publishing broker’s pub/sub service. The main function of the gateways their information. They are thus called publishers.Theentity is to provide the SA devices with access to the broker. The which ensures that the data gets from the publishers to the broker is located in the traditional network because of its subscribers is the broker.Thebrokercoordinatessubscriptions, higher performance in terms of bandwidth and capabilities. and subscribers usually have to contact the broker explicitly to subscribe. There are three principal types of pub/sub systems: topic- based, type-based and content-based [5]. With topic-based systems, the list of topics is usually known in advance, e.g., during the design phase of an application. Subscriptions and publications can only be made on a specified set of topics. In type-based systems, a subscriber states the type of data it is interested in (e.g., temperature data). Type-based systems are not very common. Content-based systems are the most versatile ones. The subscriber describes the content of messages it wants to receive. Such a subscription could be for Fig. 3. Integrated Wireless Sensor Networks with Pub/Sub Communication any messages containing both temperature and light readings where the temperature is below a certain threshold and the An application or a SA device can be both subscriber and light is on. publisher. Subscribers and publishers are decoupled from each Aformofcontent-basedmessagingisTinyDB[12].The other by the broker, even if they reside on the same device. For user issues an SQL-like query that describes the data the example a temperature sensor may need to be monitored by multiple applications for different reasons. When the data is TinySIP makes the functionality of the Session Initiator Pro- available, the sensor simply adds the appropriate topic and tocol (SIP) [16] available to WSNs.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages8 Page
-
File Size-