A Component Framework for Content-based Publish/Subscribe in Sensor Networks Jan-Hinrich Hauer, Vlado Handziski, Andreas K¨ opke, Andreas Willig, and Adam Wolisz Telecommunication Networks Group Technische Universit¨ at Berlin, Germany {hauer,handzisk,koepke,willig,wolisz}@tkn.tu-berlin.de Abstract. Component-based architectures are the traditional approach to reconcile application specific optimization with reusable abstractions in sensor networks. However, they frequently overwhelm the application designer with the range of choices in component selection and composi- tion. We introduce a component framework that reduces this complex- ity. It provides a well-defined content-based publish/subscribe service, but allows the application designer to adapt the service by making or- thogonal choices about: (1) the communication protocol components for subscription and notification delivery, (2) the supported data attributes and (3) a set of service extension components. We present TinyCOPS, our implementation of the framework in TinyOS 2.0, and demonstrate its advantages by showing experimental results for different application con- figurations on two sensor node platforms in a large-scale indoor testbed. 1 Introduction The publish/subscribe interaction scheme is a high-level service abstraction that is well adjusted to the needs of large-scale distributed applications [1]. The scal- ability and robustness of the scheme stem from the indirect and asynchronous type of interaction and make it particularly suitable for creating data-centric sen- sor network applications. In the content-based publish/subscribe variant, sub- scribers express their interest in events by injecting subscriptions into the system that contain constraints on the properties of the events. Publishers that generate events post notification messages to the system, and when a notification matches the constraints of a registered subscription, it is delivered to the corresponding subscriber (Fig. 1). Any design for sensor networks is subject to tight constraints in terms of energy, processing power and memory. These constraints frequently drive de- velopers to pursue vertically integrated solutions that are highly-optimized for specific scenarios but lack flexibility [2, 3]. Breaking up the design into fine, self- contained and richly interacting components, has proven to be a viable approach for resolving the tension between the need for reusability and the efficiency costs of abstractions [4]. The flexibility provided by the component modularization,