## 3 Middleware for WSN Virtualization
### Middleware for Network Virtualization  
**SensEye** is a multitier network based on the heterogeneous camera and sensor nodes. SensEye uses the technique of multitier sensor network to overcome the problems of latency and energy efficiency [68]. The middleware ensures that each tier in the model consists of the homogeneous sensor nodes. Multiple heterogeneous camera sensor nodes having different capabilities are part of the multi-tier network. Therefore, in order to take the maximum benefits from the network, low power and less capable elements are assigned simpler application tasks to perform. The need for motion detection can be performed by a low resolution sensor and if the intruder is detected, then the high power camera could be woken up to carry the high definition recording. Using low cost sensors results in the increase of their number, but at the cost of reliability, similarly high cost sensors provide less coverage as they will be less in number but provide high functionality. Therefore, multitier allows low cost, high coverage,reliability and functionality by the combination of high and low power devices in an energy efficient manner [68]. Design principles of SensEye middleware include: To map the task to the less power consuming nodes having more resources, maximum use of the wakeup on demand to reduce the use of radio and processor, no wasteful wakeups of high power consuming sensor nodes, reduce delay and last one is to exploit redundancy and reduce the flow of redundant data. **I-Living** is a project targeting medical assistance to the patients at home. The main focus of the project is the reliability, usability and security. Middleware playing a key role in the project enables independent parties to work together in a dependable and secure fashion, providing QoS for the critical applications. The software architecture of the middleware can handle multiple applications and communication protocols. Furthermore, middleware provides Java APIs for the application developer to use multiple services and multiple radios. Security and privacy are ensured in the middleware design, as every device in the home is authenticated using a token. **SenseWrap**[69] architecture provides a virtual sensor for any type of physical sensor. The client is able to seamlessly discover the services using a standardized interface to the devices provided by the middleware. The interfaces are based on the UDP/TCP sockets. TCP/IP provides simplified application development. The full IP stack is very efficient, but due to the limited capabilities of the sensor nodes it is unfeasible. SenseWrap software architecture supports publish/subscribe interaction style. Its middleware is based on light weight SOA. SenseWrap abstracts the common functionalities of most sensor models from the application developer. Middleware decouples the sensors from the services, thus enabling multiple services per sensor node and further taking the benefits of multiple applications per sensor node. The SenseWrap middleware is based on Zeroconf, the networks and the sensor devices will be registered through the Zeroconf that is based on the services offered by each network and further each device keeps updated record of its own services offered. Zeroconf communicating with SOAP and XML over HTTP is rather light weight for the sensor nodes, as compared with the UPnP. Middleware is based on Java with sensor discovery, services discovery and client handler as the main components. [PERSON] in [70]**GSN** middleware takes the virtual sensor approach and defines a virtual sensor as a data producer, it could be a real sensor, a camera, or any combination of real sensors. GSN is a container-based architecture that hosts virtual sensors based on declarative programming model in TinyOS. GSN targets to provide minimum or zero-programming for large sensor networks. The middleware components include virtual sensor manager which is responsible to manage the resources provided by a virtual sensor and interactions between the virtual sensors.