by Giuseppe Amato, Stefano Chessa, Francesco Furfari, Stefano Lenzi, Claudio Vairo
The convergence of sensor networks with the Web (Sensor Web) poses new problems. These relate both to the management of the enormous amounts of data continuously produced by sensors, and to the reaction to events inferred from such data. The MaD-WiSe system (MAnagement of Data in WIreless SEnsor networks), developed at ISTI-CNR, exploits the well-known database paradigm to address this issue.
The MaD-WiSe system considers a Wireless Sensor Network (WSN) as a highly distributed and dynamic database. Sensor data can be acquired, manipulated and filtered using simple SQL-like statements. Various WSN applications can be developed using its functionality. For example, the MaD-WiSe system has been used to implement a prototype application providing remote monitoring of firefighters equipped with totally encapsulated chemical suits (see Figure 1). This application enables real-time monitoring of various physiological parameters during operational activity. The information acquired can be used to raise the alarm in situations of risk, provide advice to the team leader with respect to the necessary actions, and also to analyse offline the health of those involved in an operation. The application employs five sensors that are deployed on the arms, legs and chest of the operator.
The MaD-WiSe architecture comprises a set of modules running on WSN nodes (network side), and a set of modules that offer WSN services to the external applications (context information provider). The network side consists of a set of modules that implement a distributed data stream management system on a WSN. It is organized into three layers, as shown in Figure 2. The layers interact through well-defined interfaces and are autonomous with respect to each other.
The Network Layer supports connection-oriented multi-hop communication between arbitrary pairs of nodes. The Stream System Layer offers abstraction mechanisms for data access by means of data streams. It can be thought of as the equivalent of a file system on a sensor network. The main difference is that in the Stream System, data is continuously acquired from transducers, communications between nodes and data processing.
The Stream System defines three types of streams: sensor, remote and local streams. A sensor stream is connected to a transducer and carries data originating from the transducer. A remote stream is a data channel between two distinct sensors: writing to a remote stream occurs on one sensor while reading from the stream occurs on the other. Thus remote communication between different sensors is encapsulated within the stream system, which in this respect offers the transport layer functionalities. A local stream is local to a sensor, as writing to and reading from the stream can only be requested by code running on the same sensor.
The Stream System allows streams to be created or removed, and records to be read from and written to existing streams. Data rates can be associated with both sensor and remote streams. For the former, data rates determine the activation frequency of transducers associated with sensor streams. In the latter case, data rates are used by the network layer to optimize radio scheduling: the radio is switched on only when a piece of data must be sent through a remote stream. Sensor streams can also be 'on demand'. In this case the transducers are activated only in response to an explicit read request on the stream.
The last of the three layers is the Query Processor Layer, which implements the query processor of a full-in-network distributed data stream management system. It can be programmed by the client-side subsystem in order to take part in the execution of a distributed query. The query language used in MaD-WiSe is called MW-SQL and shares its basic constructs with SQL. However, sensor network peculiarities and the distributive nature of the database implementation introduce some differences. MW-SQL allows users to express queries to manipulate, filter and organize sequences of tuples generated by the sensors. MW-SQL relies on the concept of source to present the user with an abstraction of a sequence of tuples arriving from a precise origin. The MaD-WiSe query interface is shown in Figure 3.
The MaD-WiSe context information provider fits within the raw data retrieval layer of a context-aware architecture. It comprises a low-level module (composed of a query parser, an execution plan optimizer and a query manager) and a higher-level module, the JDBC driver, which interacts with the low-level module by means of the MW-SQL language. At the current stage of the project, the JDBC driver is being encapsulated within an OSGi bundle in order to implement a gateway between the WSN and the Sensor Web, and to enable queries involving different WSNs in the Sensor Web.
MaD-WiSe was developed using nesC and is available for both TinyOs 1.x and 2.x. It runs on WSN platforms based on MICAz and IRIS motes and is distributed with an open-source licence. Further information and downloads can be found on the project Web site.
Tel: +39 050 3152906