A policy-based publish/subscribe middleware for sense-and-react applications

https://doi.org/10.1016/j.jss.2010.10.023Get rights and content

Abstract

With the inclusion of actuators on wireless nodes, Wireless Sensor Networks (WSNs) are starting to change from sense-and-report platforms to sense-and-react platforms. Applications for such platforms are characterised by actuator nodes that are able to react to data collected by sensor nodes. Sensor and actuator nodes use a variety of interactions, for example, intra-node, inter-node (1-hop to n-hop), and global (all nodes). As a result, the functionality that coordinates the activities of the different nodes towards common goals has to be efficiently distributed in the WSN itself. In addition, multiple sense-and-react applications are being deployed within the same WSN, with each application characterised by different requirements and constraints. The design and implementation of these applications is becoming an increasingly complex task that would benefit from new approaches.

In this article, we describe a novel middleware that separates the interaction behaviour of sense-and-react WSN applications from the components that implement the basic functionalities (sensing, reacting, computation, storage). This is achieved using policies that govern the interaction behaviour of sense-and-react WSN applications. The middleware is composed of a Policy Manager, a Publish/Subscribe Broker, and a set of Extensions that reside on each node. The broker manages subscription information, while extensions provide mechanisms orthogonal to the publish/subscribe core including diffusion protocols, data communication protocols, and data encryption. We conduct a detailed evaluation of the performance of our framework and show that the framework is close to TinyOS in performance but leads to more explicit and flexible application designs.

Introduction

Early applications developed for Wireless Sensor Networks (WSNs) were technically very simple. Because of the limited computational power of the sensors at that time, WSNs were mainly used for collecting data about the sensed environment. The data was then routed to a central sink device with more computational power (e.g., PDAs and laptops) for processing. Therefore, the functionality deployed in each node was dedicated to collect the sensing data and to deliver the data to the sink.

With the advent of actuator nodes and the development of sensor nodes with more computational power, it is now possible to embed more complex functionality. For such WSNs, the sense-and-react application paradigm has emerged characterised by the fact that the data gathered by the sensing nodes can be used directly by actuator nodes that can react and change the sensed environment (Deshpande et al., 2005). Because of the more complex interactions between nodes and the stringent physical limitations that characterise WSNs (i.e., in terms of power management) sense-and-react applications are often developed in an ad-hoc manner optimised for the specific environment of deployment. The code of such applications does not only deal with its basic functionality (i.e., collecting data and reacting to it) but it is intertwined with details to deal with other concerns such as data distribution and resource utilisation. Moreover, it is becoming common to have multiple sense-and-react applications deployed within the same WSN sharing some of its nodes (i.e., an air conditioning application and a fire alarm application sharing the same nodes for sensing the temperature). As a result, flexibility, maintainability, and reusability properties of the code for programming such applications are compromised (Intanagonwiwat et al., 2003, Madden et al., 2005).

There is a need for a more rigorous software engineering approach in the development of sense-and-react applications. As advocated by the Separation of Concerns (SoC) principle, the core functionality of an application should be specified in isolation from details regarding extra-functional concerns (Dijkstra, 1982, Parnas, 1972). Typically, the code for extra-functional concerns is customised and optimised for the specific environment where the overall application is deployed. In separating the application functionality from such details makes the code less prone to errors, and leads to greater reuse and easier maintenance.

The first step in order to realise the SoC principle is to provide a programming unit for encapsulating the application functionality. The component-based approach provides an efficient programming abstraction and encapsulation that is applicable to the WSN domain (Hill et al., 2000). Application components can be used as unit of functionality and fulfill the functionality requirements of the node where they are deployed. For instance, a component can be programmed for sensing data from the environment while components deployed on actuator nodes gather the data and react accordingly. The second step required is to add a layer of abstraction that can be used for coordinating the functionality of the application components and to provide the required mechanisms for handling extra-functional concerns. However, the typical abstraction provided in WSN is that of the operation system TinyOS (Levis et al., 2005) to hide to the application layer low level details.

With its loosely coupled, event-driven messaging services, the publish/subscribe paradigm (hereafter referred to as pub/sub) offers to applications simple yet powerful primitives for communication. Although the pub/sub paradigm is well understood and widely used, there are several aspects concerning notification distribution, delivery and security that can be implemented using different approaches. Each approach can be characterised by properties that satisfy the requirements of specific application domains and at the same time each imposes a set of requirements in terms of resource utilisation. For instance, for a critical application it is acceptable to use a reliable delivery protocol even if it requires more resources in terms of energy consumption and computational overhead. To make the implementation of a pub/sub system flexible enough to be used in application domains with different requirements it is necessary that the implementation is able to offer multiple approaches to satisfy the needs of each target domain. Moreover, because several applications from different domains can be deployed at the same time, it is desirable that the same instance of such a pub/sub system can support several approaches to satisfy the requirements of the deployed applications.

In this article, we describe a novel component-based framework for sense-and-react WSN applications realised through a pub/sub middleware where extra-functional concerns are defined separately from application components.1 In particular, application developers specify the interaction behaviours of components and which mechanisms are needed in their applications in terms of policies. Policies are rules that govern the behaviour of a system and are an effective solution for separating the application functionality from low-level mechanisms (Sloman et al., 1993). The framework uses an Event-State-Condition-Action policy model where policies connect application components to middleware components orthogonally to the pub/sub paradigm. Policies effectively define s tateful interactions among components to coordinate their activities and are used to fulfil system-wide goals. Once a specific behaviour is defined in a policy that policy can then be deployed or adapted for other applications with similar characteristics.

The rest of this article is organised as follows. In Section 2, we discuss the motivations and requirements of our approach. Section 3 provides a description of the architecture of our framework. Policy syntax and semantics are described in Section 4. To validate our approach, we present in Section 5 a case study and some of the policies used for its realisation. An evaluation of the implementation of our framework is presented in Section 6. Section 7 presents how our approach fulfils the set of requirements discussed in Section 2. In Section 8, we compare our approach to related research. We conclude in Section 9.

Section snippets

Motivations and requirements

Sense-and-react applications represent a class of embedded control systems characterised by the realisation of a feedback-loop between a sensing apparatus and a reacting apparatus. Some examples of sense-and-react applications are heating, ventilation, and air conditioning (HVAC) (Deshpande et al., 2005), fire alarm systems, and burglar alarm systems. Nodes capable of sensing the environment provide readings of some parameters forming the sensing apparatus. Nodes equipped with actuators react

Architecture

Fig. 1 shows the architecture of our policy-based approach. It is composed of a set of components deployed on different nodes. In each node components are arranged in the following basic three layers: an application layer, a m iddleware layer and a basic layer.

The application layer contains the application components deployed on a sensor node. Components are used for encapsulating the application functionality. As we show in Fig. 1, different components can be deployed on different nodes

Event-State-Condition-Action Policy Environment (ESCAPE)

In this section, we define the syntax and the semantics of our policy language. The syntax is defined by using a Backus–Naur form (BNF) while the semantics is described by defining the run-time behaviour of our Policy Manager. We will use as an example throughout this section the ESCAPE policy in Fig. 3. This policy is also represented as a state machine using our graphical tool (see Fig. 4). This policy captures humidity variation with the following requirement: when a variation of humidity

Case study

This section presents a case study related to cultural asset transportation service used to securely move cultural assets from one venue (museum) to another. The service was developed as part of the EU CUSPIS project (CUSPIS, 2007).

In the transportation service, a lorry transports a set of packages each containing a cultural asset. As shown in Fig. 13, the lorry is equipped with sensors and actuators on which several sense-and-react applications are deployed. During transportation, the lorry is

Evaluation

The ESCAPE programming model is based on the component-based approach where the extra-functional concerns of an application are separated into components with well-defined interfaces. Components are then integrated into larger assemblies and complete applications. In ESCAPE, application components implement the basic sensing and control functionality of sensors and actuators. For instance, a temperature sensor would include an application component that provides temperature readings.

Discussion

In this section, we will discuss how ESCAPE addresses the requirements listed in Section 2. In order to maximise reuse of application code, our framework makes a clear separation between the application functionality and its control rules. The code of application components fulfils basic functional requirements of an application: for example, a temperature component simply provides temperature readings. Such a simple component code has the advantage to be easily reused in other applications

Related work

The TeenyLIME middleware (Costa et al., 2007) was specifically designed to address the requirements of sense-and-react applications for WSNs. TeenyLIME provides a programming model based on the tuple space paradigm where sensors communicate through a shared memory. TeenyLIME offers a simple but powerful model but is limited in various aspects. The extra-functional mechanisms that are provided by TeenyLIME are fixed to specific hard-coded modules. For instance, in TeenyLIME tuples are

Conclusions and future work

In this article, we have described the ESCAPE component-based framework for WSNs based on publish–subscribe paradigm that is used to support Event-State-Condition-Action policies. Component applications implement the basic functionality of the wireless nodes (sense and reaction capabilities) while policies govern the extra-functional concerns of the application. Policies are specified using a finite state machine language that includes variables and functions in order to define complex

Acknowledgments

This research was supported by the UK EPSRC, research grants EP/D076633/1 (UBIVAL) and EP/C537181/1 (CAREGRID). The authors would like to thank our UBIVAL and CAREGRID collaborators and members of the Policy Research Group at Imperial College for their support.

Dr Giovanni Russello is Senior Researcher at Create-Netand and leads the Security Technical Group. His research interests focus on techniques for privacy and confidentiality enforcement in untrusted environments. Currently, he is leading research projects in the area of usage control and enforcement of privacy legislations in the ICT. During his period at Philips Research Labs in Eindhoven he applied some of the results of his PhD research to healthcare application scenarios. After moving to

References (22)

  • D. Braginsky et al.

    Rumor routing algorithm for sensor networks

  • European Commision 6th Framework Program - 2nd Call Galileo Joint Undertaking. Cultural Heritage Space Identification...
  • P. Costa et al.

    Programming Wireless Sensor Networks with the TeenyLIME Middleware

  • A. Deshpande et al.

    Resource-aware wireless sensor-actuator networks

    IEEE Data Engineering

    (2005)
  • E.W. Dijkstra

    Selected Writings on Computing: A Personal Perspective

    (1982)
  • J. Hauer et al.

    A Component Framework for Content-Based Publish/Subscribe in Sensor Networks

  • J. Heidemann et al.

    Matching data dissemination algorithms to application requirements

  • W. Heinzelman et al.

    Energy-efficient Communication Protocols for Wireless Microsensor Networks

  • W.B. Heinzelman et al.

    Middleware to support sensor network applications

    IEEE Network

    (2004)
  • J. Hill et al.

    System architecture directions for networked sensors

  • C. Intanagonwiwat et al.

    Directed diffusion: a scalable and robust communication paradigm for sensor networks

  • Cited by (25)

    • Hybrid approach for selective delivery of information streams in data-intensive monitoring systems

      2016, Advanced Engineering Informatics
      Citation Excerpt :

      The publish/subscribe middleware are solutions providing asynchronous communication between multiple entities of the system. The approach is especially popular in Wireless Sensor Networks, which consist of multiple communicating devices and require efficient ways of communication [21–23]. The publishers produce information to the consumers (subscribers).

    • A survey of security solutions for distributed publish/subscribe systems

      2016, Computers and Security
      Citation Excerpt :

      However, the details of the security implementation, including the protocols, algorithms and even the actual mechanisms, are left unspecified and hence for the application developers to realize on their own. Taking the idea of custom policy enforcement as a central focus, Russello et al. (2011) propose a policy-driven, publish/subscribe middleware and associated tool-support for wireless sensor network (WSN) based sense-and-react applications, in the form of ESCAPE – Event-State-Action Policy Environment. ESCAPE – which refers more precisely to the policy management framework for Russello et al.'s middleware, however, we use the acronym here loosely to refer to the whole infrastructure – is founded on the principles of strict separation of concerns, realized via components, which implement an application's core functionality, as well as core middleware functions; and policies, which govern non-functional features and platform-specific configuration.

    • PS-QUASAR: A publish/subscribe QoS aware middleware for Wireless Sensor and Actor Networks

      2013, Journal of Systems and Software
      Citation Excerpt :

      Also, this proposal supports the use of actors. A policy-based publish/subscribe middleware for sense-and-react applications is presented in Russello et al. (2011). Applications are specified using a customized high level language called ESCAPE which is later translated to platform-specific code automatically.

    • A content-aware bridging service for publish/subscribe environments

      2013, Journal of Systems and Software
      Citation Excerpt :

      For instance, Schmidt and O’Ryan (2003) propose a publisher/subscriber architecture for distributed real-time systems based on CORBA middleware, and Yoo et al. (2006) propose an XML-based solution for deploying publish/subscribe systems. More recently, in Russello et al. (2011) the authors propose a publish/subscribe middleware for sense-and-react applications. MOM technologies are usually implemented as brokered services, hence leading to well known issues derived from centralized architectures such as single point of failure and bottleneck.

    View all citing articles on Scopus

    Dr Giovanni Russello is Senior Researcher at Create-Netand and leads the Security Technical Group. His research interests focus on techniques for privacy and confidentiality enforcement in untrusted environments. Currently, he is leading research projects in the area of usage control and enforcement of privacy legislations in the ICT. During his period at Philips Research Labs in Eindhoven he applied some of the results of his PhD research to healthcare application scenarios. After moving to the Department of Computing at Imperial College London he developed a decentralised trust-management system for the e-health application domain.

    Dr Leonardo Mostarda is a lecturer in the School of Engineering and Information Science at Middlesex University. His research interests include distributes systems, wireless sensor networks, monitoring systems and security. From 2007 to 2010 he was a post-doc student at Imperial College London. There he was working on the Ubival project in cooperation with UCL, Oxford, Cambridge and Birmingham universities. From 2006 to 2007 he was cooperating with the European Space Agency (ESA) on the Cuspis European project. This project included several partners such as Vodafone, IBM and The Italian ministries of Cultural heritage. He received his Ph.D and computer science degree from the University of L’Aquila in 2006 and 2002, respectively.

    Dr Naranker Dulay is a Reader in the Department of Computing at Imperial College. He works on techniques and applications of security, trust and privacy applied to pervasive, mobile and internet systems. He has over 100 publications and has served on the programme committees for numerous conferences. He currently leads research projects on pervasive workflows, home networking and medical healthcare, with a focus on usability issues.

    A preliminary version of this paper appeared in CBSE 08.

    View full text