ORIGINAL ARTICLE Eduardo Souto Æ Germano Guimara˜es Glauco Vasconcelos Æ Mardoqueu Vieira Æ Nelson Rosa Carlos Ferraz Æ Judith Kelner Mires: a publish/subscribe middleware for sensor networks Received: 10 July 2004 / Accepted: 17 November 2004 / Published online: 9 October 2005 Ó Springer-Verlag London Limited 2005 Abstract A wireless sensor network (WSN) consists of a large number of small devices with computational power, wireless communication and sensing capability. These networks have been developed for a wide range of applications, such as habitat monitoring, object track- ing, precision agriculture, building monitoring and mil- itary systems. Meanwhile, middleware systems have also been proposed in to facilitate both the development of these applications and provide common application services. The development of middleware for sensor networks, however, places new challenges on middle- ware developers due to the low availability of resources and processing capacity of the sensor nodes. In this context, this paper presents the design and implemen- tation of a middleware for WSN named Mires. Mires incorporates characteristics of message-oriented mid- dleware by allowing applications communicate in a publish/subscribe way. In order to illustrate the pro- posed middleware, we have also developed an environ- ment-monitoring application and a data aggregation service. Keywords Middleware Æ Publish/subscribe systems Æ Wireless sensor networks 1 Introduction A wireless sensor network (WSN) consists of a large number of small devices with computational power, wireless communication and sensing capability [1]. Sen- sor nodes are usually scattered in an observation region. Each sensor node in the observation region is responsi- ble for extracting data from the environment (such as temperature, humidity, pressure and luminosity), pro- cessing and sending this data through one or more sink nodes, which are in turn responsible for transmitting this data to the final user. These networks have been developed for a wide range of applications such as habitat monitoring, object tracking, precision agriculture, building monitoring and military systems [1, 2, 3]. Common to these applications is the need for continuous collection and integration of data from a large number of sensor nodes. Hence, a basic issue for middleware is how to satisfy an applica- tions’ requirements considering the specific characteris- tics of sensor networks such as constrained sensor power and network bandwidth. The design of sensor networks applications is therefore highly influenced by resource scarcity (e.g., battery, memory and processor), commu- nication models and application requirements. In this way, most research in this area has been di- rected to the development of new protocols that pro- mote efficient resources utilization, mainly with respect to the power consumption [4, 5, 6, 7]. Although these protocols are effective in extending the lifetime of sensor networks, the gap between the protocols and the appli- cation inhibits their effective use by application devel- opers [8]. To make these protocols more useful, application designers would benefit from a middleware layer that hides details of communication protocols, while providing an API (Application Programming Interface) that reduces the cost of developing applica- tions. In this context, the design and implementation of an appropriate middleware layer to fully realise the capa- bilities of sensor technologies and applications is now an open research issue. Traditional middleware systems such as Java RMI (Remote Method Invocation) [9], EJB (Enterprise JavaBeans) [10] and CORBA (Common Object Request Broker Architecture) [11] are normally heavyweight in terms of memory and computation and therefore not suitable for WSNs [12]. A middleware for WSN should facilitate development, maintenance, deployment and execution of sensing-based E. Souto (&) Æ G. Guimara˜es Æ G. Vasconcelos Æ M. Vieira Æ N. Rosa Æ C. Ferraz Æ J. Kelner Professor Luis Freire, Cidade Universitria, Federal University of Pernambuco, Informatic Center, 50740-540 Recife, PE, Brazil E-mail: ejps@cin.ufpe.br Tel.: +55-81-21268430 E-mail: gfg@cin.ufpe.br E-mail: gpv@cin.ufpe.br E-mail: msv@cin.ufpe.br E-mail: nsr@cin.ufpe.br E-mail: cagf@cin.ufpe.br E-mail: jk@cin.ufpe.br Pers Ubiquit Comput (2006) 10: 37–44 DOI 10.1007/s00779-005-0038-3