## 3 Middleware for WSN Virtualization
### Middleware for Sensor Virtualization
It also employs the programming of the sensor nodes to support concurrent applications. **Hourglass**[57] is a middleware based on the SOA, supporting multiple applications. Hourglass considers naming, discovering, filtering, routing and aggregation of the data. It uses different circuits (connected networks) according to the services demanded by the consumer. Hourglass considers mobility of the data producer and make sure the data is delivered in a reliable manner. In case of disconnection it keeps the flow by using large buffer size, it stores data and then transmits when the connection is reestablished. This is very helpful in poorly connected entities and intermittent environment. Furthermore, it partially decouples the applications from the networks and provides a platform for different service providers to aggregate. Hourglass Circuit Description Language (HCDL) provides interfaces which are based on the XML to program the sensor network circuits based on TCP connections. The sensor networks use proxies to connect to hourglass infrastructure that is an overhead of the design. At University of Massachusetts research group of Storage-centric Networked Embedded Systems (**STONE**) is working on the efficient storage and aggregation of data for multi-application sensor networks using NAND flash memories [50, 58]. The role of the middleware is to facilitate the low power storage in an efficient manner. In [59] the middleware is based on RESTful style, using Sensor Web Enablement (SWE). The middleware provides the extension of SWE by using a lightweight JSON data format instead of XML. Furthermore, it overcomes the deficiencies of data format and the architectural style of SWE. This extension helps in the development of virtual sensor network based on RESTful architecture using SWE. The results show that there is a significant reduction in the communication time. Wendi takes the work of **MiLAN** middleware forward in [60], and allows multiple applications run on a single network. It provides policies and management tools for handling the networks and sensor nodes. It offers control policy for the sensor virtualization, and a group of sensors contributing to achieve the desired QoS. In MiLAN application and the network are unified in a single middleware system. Furthermore, it also provides flexibility to a number of network protocols like PAMAS, SMAC. MiLAN Middleware couples applications tightly with the network without affecting the control policies. Furthermore, it changes the network functionality according to the application needs. **Mires**[61] is a message oriented middleware facilitating application to communicate in a publish/subscribe manner, where each node adversities its sensing capabilities. Mires concentrates on the environment-monitoring application, Mires middleware resides on top of the TinyOS and provides high level APIs supporting multiple applications. The middleware collects data from sensor nodes, aggregates it and then transmits it, in order to reduce the number of transmissions. In Mires middleware the session is divided into the following parts: establishment, announcement, subscription and publication. **MAMA** Multi Application Middleware [62] is middleware providing sensor virtualization support, based on middleware abstraction layer that creates a virtual environment using grid computing. The middleware allows running of several TinyOS applications concurrently. Furthermore, thread based model is used for the middleware design. The cost of multiple application support is significant on the memory footprint of RAM and ROM. The delay and power awareness are also considered in the MAMA middleware design. Furthermore, overall energy consumption of the network is significantly reduced as fewer devices are deployed. Moreover the system can be made more energy efficient by treating different applications according to their QoS requirements. In another work in [63] energy harvesting network and device simulator, based on TinyOS is made.