The miniaturization of hardware components has lead to the development of Wireless Sensor Networks (WSN) and networked-applications over them. Meanwhile, middleware systems have also been proposed in order to both facilitating the development of these applications and providing common application services. The development of middleware for sensor networks, however, places new challenges to middleware developers due to the low availability of resources and processing capacity of the sensor nodes. In this context, this paper presents a middleware for WSN named Mires. Mires incorporates characteristics of message-oriented middleware by allowing applications communicate in a publish/subscribe way. In order to illustrate the proposed middleware, we implement an aggregation middleware service for an environment-monitoring application. Categories and Subject Descriptors C.2.4 [Computer-Communication Networks]: Distributed Systems. General Terms Design, Experimentation. Keywords Wireless sens...