Design of a Web-based Application for Wireless Sensor Networks



Similar documents
Data Management in Sensor Networks

Chapter -5 SCALABILITY AND AVAILABILITY

Evaluation of Unlimited Storage: Towards Better Data Access Model for Sensor Network

MOTEWORKS. Key Features. Overview

Myths and Realities of Sensor Network Data Management

Development of a web-based interface for remote monitoring long-distance power transmission overhead lines

Routing and Transport in Wireless Sensor Networks

NanoMon: An Adaptable Sensor Network Monitoring Software

Adaptive Medium Access Control (MAC) for Heterogeneous Mobile Wireless Sensor Networks (WSNs).

DAG based In-Network Aggregation for Sensor Network Monitoring

Design of Remote data acquisition system based on Internet of Things

Building Web-based Infrastructures for Smart Meters

Congestion Control in WSN using Cluster and Adaptive Load Balanced Routing Protocol

INTERNET OF THE THINGS (IoT): An introduction to wireless sensor networking middleware

Client Overview. Engagement Situation. Key Requirements

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

High Level Design Distributed Network Traffic Controller

An Intelligent Car Park Management System based on Wireless Sensor Networks

REMOTE TEMPERATURE AND HUMIDITY MONITORING SYSTEM USING WIRELESS SENSOR NETWORKS

Technical White Paper The Excel Reporting Solution for Java

JAVA/J2EE DEVELOPER RESUME

A NOVEL OVERLAY IDS FOR WIRELESS SENSOR NETWORKS

Customer Bank Account Management System Technical Specification Document

Monitoring Software using Sun Spots. Corey Andalora February 19, 2008

QUALITY OF SERVICE METRICS FOR DATA TRANSMISSION IN MESH TOPOLOGIES

Data processing goes big

Comparing Microsoft SQL Server 2005 Replication and DataXtend Remote Edition for Mobile and Distributed Applications

Using Received Signal Strength Indicator to Detect Node Replacement and Replication Attacks in Wireless Sensor Networks

Final Report - HydrometDB Belize s Climatic Database Management System. Executive Summary

An experimental test bed for the evaluation of the hidden terminal problems on the IEEE standard

Dynamic and Adaptive Organization of Data-Collection Infrastructures in Sustainable Wireless Sensor Networks

JReport Server Deployment Scenarios

Wireless Sensor Network: Improving the Network Energy Consumption

S3 Monitor Design and Implementation Plans

Routing Protocols for Wireless Sensor Networks

Japan Communication India Skill Development Center

XpoLog Competitive Comparison Sheet

Performance Management Platform

Mastering Tomcat Development

Using Database Metadata and its Semantics to Generate Automatic and Dynamic Web Entry Forms

15 th TF-Mobility Meeting Sensor Networks. Torsten Braun Universität Bern

Monitoring PostgreSQL database with Verax NMS

Real Time Databases in Wireless Sensor Networks

Communiqué 4. Standardized Global Content Management. Designed for World s Leading Enterprises. Industry Leading Products & Platform

Client-server 3-tier N-tier

Chapter 1 - Web Server Management and Cluster Topology

A Secure Data Transmission for Cluster based Wireless Sensor Network Using LEACH Protocol

Integration of the OCM-G Monitoring System into the MonALISA Infrastructure

Sensor Event Processing on Grid

A Routing Algorithm Designed for Wireless Sensor Networks: Balanced Load-Latency Convergecast Tree with Dynamic Modification

T task De dissemination and Routing

New Methods for Performance Monitoring of J2EE Application Servers

Web Development Frameworks

The Interoperability of Wireless Sensor Networks

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture # Apache.

An Efficient Hybrid Data Gathering Scheme in Wireless Sensor Networks

Japan Communication India Skill Development Center

Oracle BI Publisher Enterprise Cluster Deployment. An Oracle White Paper August 2007

BROWSER-BASED HOME MONITOR USING ZIGBEE SENSORS

Java Application Developer Certificate Program Competencies

Charith Pereral, Arkady Zaslavsky, Peter Christen, Ali Salehi and Dimitrios Georgakopoulos (IEEE 2012) Presented By- Anusha Sekar

FAMA/TDMA Hybrid MAC for Wireless Sensor Networks

Modeling Web Applications Using Java And XML Related Technologies

Thingsquare Technology

Performance Advancement of Wireless Sensor Networks using Low Power Techniques and Efficient Placement of Nodes

EPMOSt: An Energy-Efficient Passive Monitoring System for Wireless Sensor Networks

A Stream-Oriented Power Management Protocol for Low Duty Cycle Sensor Network Applications

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

AN EFFICIENT STRATEGY OF AGGREGATE SECURE DATA TRANSMISSION

A Network Stability Monitoring Mechanism of Cluster-Oriented

Graphical Web based Tool for Generating Query from Star Schema

Integrating VoltDB with Hadoop

Japan Communication India Skill Development Center

SPY AGENT BASED SECURE DATA AGGREGATION IN WSN

Version Overview. Business value

Packet Power. Data Center Solutions. Packet Power for Data Centers. Benefits. Features. The Packet Power Solution. Data Center Monitoring Made Easy

Crystal Reports for Borland JBuilder

CatDV Pro Workgroup Serve r

OPTIMIZED SENSOR NODES BY FAULT NODE RECOVERY ALGORITHM

A Middleware for OSCAR and Wireless Sensor Network Environments

SharePoint 2010 Interview Questions-Architect

XFlash A Web Application Design Framework with Model-Driven Methodology

A Slow-sTart Exponential and Linear Algorithm for Energy Saving in Wireless Networks

Introductory Concepts

Component visualization methods for large legacy software in C/C++

High-Frequency Distributed Sensing for Structure Monitoring

Performance Comparison of Persistence Frameworks

XBee Wireless Sensor Networks for Temperature Monitoring

RFID. Radio Frequency IDentification: Concepts, Application Domains and Implementation LOGO SPEAKER S COMPANY

Pivot Charting in SharePoint with Nevron Chart for SharePoint

Product Overview. Dream Report. OCEAN DATA SYSTEMS The Art of Industrial Intelligence. User Friendly & Programming Free Reporting.

Eclectic Computing. Time Tracking Tool Software Architecture Document. Version <1.3>

Wireless Sensor Networks for Habitat Monitoring

Load Manager Administrator s Guide For other guides in this document set, go to the Document Center

Using Virtual Markets to Program Global Behavior in Sensor Networks

Java Technology in the Design and Implementation of Web Applications

Modern Software Development Tools on OpenVMS

Business Process Management

Streaming Big Data Performance Benchmark for Real-time Log Analytics in an Industry Environment

A Plan for the Continued Development of the DNS Statistics Collector

Transcription:

Design of a Web-based Application for Wireless Sensor Networks Sajid Hussain, Nick Schofield, and Abdul W. Matin Jodrey School of Computer Science, Acadia University Wolfville, Nova Scotia, Canada {Sajid.Hussain, 049475s, 073720m}@acadiau.ca Abstract Wireless sensor networks (WSNs) are used for various ubiquitous and pervasive environments. A few common applications are security, agriculture, automation, and environmental monitoring. This paper provides the software architecture and design to develop a webbased application to query a wireless sensor network. A model-view-controller architecture is used to develop a generic web-based application. This application can act as a template to develop a simple interactive webbased tools for WSN-based technologies. The architecture is applied to design two monitoring protocols: continuous monitoring (CM) and query-based monitoring (QM). In CM, the application is designed for a specific query; however, in QM, the network is interactive and different queries can be sent. 1. Introduction Wireless Sensor Networks (WSNs) are an emerging technology with a very diverse range of applications. These applications range from monitoring growing conditions of large farm fields to monitoring the operation of equipment in automated manufacturing facilities [4, 5]. Although the particular applications of WSNs vary greatly, they all share the same problem that is inherent when using the technology, battery life. The individual nodes of a wireless sensor network are called motes. Because many applications require that the motes are placed in remote and inaccessible locations, simply changing the batteries when they die can be difficult or impossible. This places a high premium on battery life. As the battery consumption is very high during radio transmissions, the communication protocols should be designed to optimize the number of transmissions, which will result in reduced battery consumption. Moreover, the extended network life can be achieved by cross layer optimization that will span over several layers such as application, database, and network [11, 14]. As web is widely used for ubiquitous, pervasive, and seamless applications. We propose a web-based architecture to design applications that require WSNbased technology. The proposed framework provides details for the complete protocol stack, which covers application, database, and network layers. As the design incorporates standard software architectures and open-source software tools, the design is simple, robust, as well as scalable. The remaining paper is organized as follows: Sec. 2 describe a few related strategies for database and routing in WSNs. Sec. 3 describe the two protocols that are implemented for the prototype application. The architecture and design are described in Sec. 4. The implementation details are illustrated in Sec. 5. Finally, Sec. 6 concludes the paper. 2. Related Work. The database approach is widely used for WSNs. Madden et al. [10] have implemented an acquisitional query processing system for sensor networks. This approach provides a declarative interface for the data collection and in-network aggregation. Yao and Gehrke [15] proposed a layered architecture consisting of application, routing and query proxy layers. The query proxy layer is present on each sensor node and connects the application and routing layers. For energy-efficient routing, cluster-based approaches are quite common for habitat and environment monitoring. For instance, Heinzelman et al. [7] describe the LEACH protocol, which is a hierarchical self-organized cluster-based approach for monitoring applications. Based on time division multiple access (TDMA), the sensor nodes transmit data to the cluster heads, which aggregate and transmit the data to the base station. Directed diffusion and its variations are used for event-based monitoring. Intanagonwiwat et al.

[9] describes a directed diffusion protocol where query (task) is disseminated into the network using hop-byhop communication. When the query is traversed, the gradients (interests) are established for the result return path. Finally, the result is routed using the path based on gradients and interests. Braginsky et al. [1], a variation of directed diffusion, use rumor routing to flood events and route queries; this approach is suitable for a large number of queries and a fewer events. Gay et al. [6] identifies a few software design patterns in the implementation of TinyOS. Due to realtime environment and memory constraints, the objects are statically allocated and the software components of TinyOS are quite unique as compared to traditional software components and design patterns. In this paper we provide the architecture and design for implementing web-based applications for sensor networks. The focus is on scalable creation of webbased tools and applications for sensor networks. For a proof-of-concept implementation, the techniques and protocols used for database and routing layers are quite generic; however, the architecture and design can be applied for more advanced routing protocols. 3. Protocols This section describes two communication protocols for sensor networks. 3.1. Constant Monitoring Protocol The simplest communication protocol for a WSN is the constant monitoring (CM) protocol. The CM protocol is implemented by taking sensor readings at a constant interval and transmitting those readings over the radio. This type of protocol has the advantage of being very simple and supplying a very constant and reliable stream of data. It is, however, incredibly inefficient from a power point of view. With this protocol, the radio is always on and transmits a large amount of data whether it is required or not. Another weak point in the basic CM protocol is that the frequency at which the sensors are polled is fixed. 3.2. Query-based Protocol While the CM protocol is easy to understand and implement, it cannot be very efficient. This is primarily because the radio always has to be in an on state in order to receive new instructions from the base station. On the other hand, if the radio is turned off when the mote is not sending, the mote cannot receive any packet. Consequently, the poll frequency cannot be changed. This problem is solved by using a Query-based protocol (QP). A QP protocol takes a different approach to WSNs than a CM protocol. Instead of constantly monitoring the environment and reporting readings at a regular interval, the motes will respond to queries for the specified duration. The information contained within these queries allows power consumption optimization for the duration of the query. For example, a sample query could be as follows: SELECT all sensor readings, POLL 100 times, INTERVAL 60000 ms, WHERE temperature > 25; This query requests motes to poll the sensors 100 times and have an interval of one minute (60000 ms) between successive sensor polls. Additionally, the mote should only transmit the readings if the temperature value is greater than 25 degrees. These query parameters can significantly reduce the battery consumption. First, it allows the adjustment of the polling frequency. Additionally, because the duration of the polling is known, the radio can be turned off when there is no need of transmission. Once the query is completed (i.e. all 100 polls have been completed), the radio is turned on to listen for another query. Finally, if the data readings are below a certain threshold value, there is no need to transmit a packet. It shows that carefully structured queries have the potential to result in massive power savings. As transmitting and receiving take a huge amount of power, their reduction is an easy and incredibly effective way to enhance battery life. 4. Architecture and Design In this section we describe the architecture and design for a web-based WSN application. Although Javarelated technologies are used as examples, the approach can be applied and extended for any framework, such as Micrsoft s.net environment. 4.1. Model-View-Controller (MVC) The Model-View-Controller (MVC) architecture is used to design an application. This means that no application logic is implemented in the Java Server Pages (JSPs); they solely contain view logic. Instead, the JSPs receive information via forms and pass the data to a controller servlet. The controller then performs the required task, such as getting data from the data model. It will then hand control back to a JSP that will display the results.

In order to facilitate the Controller Servlet s access to the data model, a framework similar to Hibernate [8] should be used. The usage of framework will facilitate the interaction with the database. Moreover, the controller will be independent of any particular database management system. For instance, the Hibernate Framework could be used to interact with the database. Hibernate is an open source Object/Relational service that allows the database tables to be treated as plain old Java objects (POJOs). This is accomplished through a mapping XML file in which the tables are related to POJOs, and table columns to variables with appropriate getters and setters in the POJO. Hibernate also provides an SQL-like query interface to the database. Instead of returning result sets like JDBC, Hibernate returns lists of these mapped POJOs. This makes maintaining a fully object-oriented designed architecture much easier. 4.2. Data Model An Entity-Relationship (ER) model is used to describe the data model. Although not shown in this paper, the UML class diagrams can be created corresponding to an ER digram. Figure 1 shows an Entity- Relationship diagram of the database used in this application. The Motes entity represents client motes that The software written for the client motes is designed using a combination of both the constant monitoring protocol and query based protocol. When the motes are first started they default to a CM protocol with a poll frequency of one minute. This is a relatively neutral starting state and will suffice until the first query is issued. Moreover, it provides the easy integration of a new node into a network. Once a query is received from the base station, the motes start using a QP protocol. Figure 2 shows a graphical representation of the states of the client motes. At start every mote is in constant-monitoring state. Then, after receiving a query packet, the mote acquires a query-based state. A mote will remain in the query-based state until it has not monitored all the required polls (samples). It should be noted that the mote will acquire the samples depending on the number of polls specified in the query; however, the number of transmissions will depend on the selection criteria. Once all the specified polls are done, the mote goes back to constant-monitoring state. Now, in the continuous monitoring state, the mote will again start listening for the incoming query packets. Start Constant Monitoring Query Based id description id reading Figure 2. Client Mote State Diagram Motes Sensors 1 m Sent From 1 m Read By Readings id name units description timestamp The query packet contains information such as poll frequency, poll count and threshold values for the sensors. During the duration of the query, the radio is turned off when there is no need for transmission, to conserve power. This means that no other queries can be received until the currently active query is completed. If desired, a query can be issued that will send the client back to using the CM protocol. Database Entity-Relationship Dia- Figure 1. gram 4.3. View send readings to the web application. The Sensors entity represents the sensors that each mote may have. These sensors are given an id number in the client mote code and that must match up to the id of the sensor in the database. The Readings entity represents a sensor reading that was received by the web application; it references both the mote and sensor entities. In fact, the instance of a Reading entity cannot exist without both a mote and a sensor. In terms of Entity Relationship diagram, Reading is a weak entity whose owners are Motes and Sensors. There are a few web pages (JSPs) to be included in the web application. The required JSPs and their descriptions are as follows: a) Start - the start page for the application, this page contains the layout of the site; b) Meta-data - this JSP contains various declarations that are used by all other JSPs; c) this page is included in each of the JSPs; d) Default - it contains a welcome message; e) Add Mote - it contains the form to add a mote to the WSN; f) Query - it contains the WSN query interface; and g) Mote View - it contains the data visualization information.

5. Implementation This section outlines the design of the QP protocol implementation for a web application. The web application is an indication of the potential opportunities when developing WSN user interfaces. It is by no means authoritative; however, it provides a simple query interface, graphs, as well as tables to display the data received by the client motes. 5.1. External Software The motes used in this sample implementation are the Tmote Sky model by Moteiv. One mote is plugged into the server computer and acts as the base station. The remaining motes are distributed around an area and act as the remote sensors. On the server side, many software packages are used to build the web application and database back end. They are: a) Apache Tomcat [13], the servlet container that the web app is deployed to, b) PostgreSQL [12], the Database Management System to store the information collected from the motes, c) Hibernate [8], Object/Relational helper used to map objects in the web application to the data in the database, d) Cewolf [2], generates charts on the fly for data visualization. 5.2. Server Software Three main components comprise the server for this application. The first is the DBMS which will be used to store the data received from the client motes; PostgreSQL [12] is used for this example. Secondly, a servlet container must be used to host the web application; Apache Tomcat [13] is used in this case. The third major component is a working TinyOS [3] environment and a connected mote to act as a base station for receiving data from the client motes. Once all three of these components are installed and configured, the server components can be installed. The mote that is to act as the base station should be programmed with the T OSBase application that is included with the TinyOS distribution. This program is designed to filter out all packets that do not include the proper group ID to ensure that the client motes are programmed with the same group ID as the base station. As previously mentioned, the DBMS used for this example is PostgreSQL. However, this can be easily substituted for any other relational database. The only modifications necessary for such a change would be to the DB creation SQL script, the hibernate configuration, and mapping files included in the web application. The Tomcat servlet container is chosen for its popularity, ease of deployment and price. However the web application can be deployed with any servlet container. There are no Tomcat specific extensions in the design or creation of the web application. 5.3. Application View The pages recommended in Section 4.3 are used for the application development. One of the primary benefits of using TinyOS is its excellent integration with the Java programming language. TinyOS s primary method of integration is achieved through its Message Interface Generator (MIG). MIG is a tool included with the TinyOS distribution that takes in the specially formatted header file for the application, extracts information regarding the format of the packets that can be sent or received by the application, and creates a Java class that represents that packet. These Java classes can be used in the server side application to send and receive messages from the WSN, without having to worry about the format. Other Java libraries are included with the TinyOS distribution that allow to send and receive messages. These libraries use the classes generated by the MIG as their input and output. These libraries, combined with the MIG, enable easy communication between any Java application and WSN. The query interface for the web application provides all the necessary fields mentioned in section 3.2. Once a query has been sent to one or more motes in the WSN, the motes will not respond to any more queries until their current query is completed. Because of this, the queries should be carefully designed before submitting to the WSN; otherwise, the WSN will be unresponsive for a large amount of time. Another feature of note in the query interface is the ability to revert the WSN back to using a CM protocol as described in section 3.1. Issuing a query like this still allows to specify threshold values for the sensor readings, as well as sensor poll frequency. This allows to have fine grained control over the CM protocol. Data Visualization. There is no doubt that data visualization is the most important part of a WSN monitoring application. It is in this section of the application where the raw data obtained from the WSN is converted into something useful for the user. The data visualization portion of this web application is an example of what is possible in this regard. Figure 3 shows the various components of this interface. The top-most portion of the figure contains a table which shows you the description of the mote currently being displayed, as well as drop down menus to choose which sensor to view and for what window of time to display. Because

This paper outlines an architecture and design of a web-based application for sensor networks. The proposed design is used to implement a sample application for a query-based protocol. The techniques described in this paper are, however, in no way meant to be a definitive guide on how to design a WSN. For example, more comprehensive database approaches and routing protocols can be incorporated in implementing a web-based application. References Figure 3. Sample Data Visualization WSNs can generate an incredibly large amount of data over an extended period of time, being able to filter the data displayed becomes increasingly important. A more complex application could expand on the simple time filtering presented here and add such filters as threshold values and pattern matching. The lower part of this interface contains a chart of the data required. Although presenting sensor readings in a pure tabular form can be useful, it becomes much easier to understand and visualize the data when it is in graphical form. To perform the graphing functionality, the CeWolf open source library was used. This library allows various types of graphs and charts to be generated on the fly and inserted into JSP pages. This is a much nicer solution than constantly creating temporary files, displaying them in the application and then deleting them. The CeWolf library also has the ability to create many other types of charts. A more sophisticated web application could, for example, overlay the data from many motes on top of each other so they could be very quickly compared. 6. Conclusion [1] D. Braginsky and D. Estrin. Rumor routing algorthim for sensor networks. In Proceedings of the 1st ACM International Workshop on Wireless Sensor Networks and Applications, pages 22 31, New York, NY, USA, 2002. ACM Press. [2] Cewolf. http://cewolf.sourceforge.net/. [3] TinyOS Community. http://www.tinyos.net/. [4] D. Estrin, D. Culler, K. Pister, and G. Sukhatme. Connecting the physical world with pervasive networks. IEEE Pervasive Computing, pages 59 69, January- March 2002. [5] D. Estrin, R. Govindan, J. Heidemann, and S. Kumar. Next century challenges: Scalable coordination in sensor networks. In Proceedings of the International Conference on Mobile Computing and Networks (Mobi- Com), 1999. [6] D. Gay, P. Levis, and David Culler. Software design patterns for tinyos. In ACM International Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES), June 2005. [7] W. R. Heinzelman, A. Chandrakasan, and H. Balakrishnan. Energy-efficient communication protocol for wireless microsensor networks. In Proceedings of the Hawaii International Conference on System Sciences, January 2000. [8] Hibernate. http://www.hibernate.org/. [9] C. Intanagonwiwat, R. Govindan, and D. Estrin. Directed diffusion: A scalable and robust communication paradigm for sensor networks. In Proceedings of the 6th Annual International Conference on Mobile Computing and Networking, pages 56 67, August 2000. [10] S. R. Madden, M. J. Franklin, J. M. Hellerstein, and W. Hong. TinyDB: an acquisitional query processing system for sensor networks. ACM Transactions on Database Systems (TODS), 30(1):122 173, 2005. [11] V. Mhatre, C. Rosenberg, D. Koffman, R. Mazumdar, and N. Shroff. A minimum cost heterogeneous sensor network with a lifetime constraint. IEEE Transactions on Mobile Computing (TMC), 4(1):4 15, 2005. [12] PostgreSQL. http://www.postgresql.org/. [13] Apache Tomcat. http://tomcat.apache.org/. [14] N. Trigoni, Y. Yao, A. Demers, J. Gehrke, and R. Rajaramany. Wavescheduling: Energy-efficient data dissemination for sensor networks. In Proceedings of the International Workshop on Data Management for Sensor Networks (DMSN), in conjunction with the International Confernece on Very Large Data Bases (VLDB), August 2004. [15] Y. Yao and J. E. Gehrke. Query processing in sensor networks. In Proceedings of the International Conference on Innovative Data Systems Research (CIDR), January 2003.