## 3 Middleware for WSN Virtualization
### Middleware for Sensor Virtualization  
VITRO [44] aims to propose a service provisioning framework based on middleware that is scalable, flexible, easy to use and energy aware for the virtual sensor network platforms. VITRO is based on adaptable middleware that allows dynamic management of services and isolation between the applications and services. VITRO provides the holistic view of the network from the sensor to the user application involving gateway and core network. In the project efforts have made to stipulate a novel service provisioning framework and mechanisms for integrating heterogeneous sensors, and networks. Multiple WSN islands are formed by the sensor nodes. Different types of islands aggregate on a single point using the respective island gateway. The virtual sensor network (VSN) manager provides interfaces to the users, wireless sensor network islands (WSI) and service registry that is the database of the core framework. VITRO's middleware layer resides on the sensor node and main modules of the middleware are: node virtualization manager, service discovery, resource discovery and energy manager. Middleware also has an interface with the node virtualization manager. Security manager also lies at the node that collaborates with the network and the MAC layer. VITRO defines the interfaces and components from sensor to virtual gateway and further, gateway connecting to virtual manager to the user applications. The session establishment sequence in VITRO shows the application negotiates with the VSN manager, VSN connects to the virtual cognitive gateway that finally connects to the sensor node. The virtualization manager uses publish/subscribe mechanism with the virtual gateway and sensor nodes. VITRO extends the concept of virtualization from user query down to the sensor node [45]. It combines different services provided by the sensors to serve applications that provide adaptability and flexibility. The software architecture of the middleware is based on the Service Oriented Architecture (SOA) and Resource Oriented Architecture (ROA). The hybrid design is taking the advantage of SOA on the application part and ROA on the sensor part. Further, it takes into realization both the network virtualization and sensor virtualization, VITRO opens new opportunities for business by providing its service provisioning business model according to the Service Level Agreement (SLA) with different WSIs and infrastructure providers. Requirements of a smart home are increasing, as the rapidly growing elderly population of the world is increasing. This problem is to be solved by the cost-effective network models and middleware designs. VSNware [32] is the middleware whose software architecture is based on Virtual Machine it extends the work of Mate [21] and Melete [46]. The VSNware middleware supports different applications to run on the sensor network. VSNware supports sensor virtualization it that helps in the reduction of the overall cost and complexity significantly by facilitating multiple applications. The software architecture consists of a virtualization layer based on Embedded Linux, it is a multitasking OS that hides the low level details of the hardware, software, and the sensor network. The middleware design depends on the system architecture that is divided into three main layers: application level user (ALU), sensor virtualization, network service provider (SVNSP) and physical sensors. The physical sensors are the sensor infrastructure provider (SINP), a number of infrastructure providers are aggregated on the platform of SVNSP this provides an abstraction layer between the ALU and the SINP. There could be multiple SINPs and a number of SVNSPs all collaborating to serve ALU queries. VSNware proposes business model, sensor node architecture and a mathematical model based on graph theory and middleware for sensor virtualization. Furthermore, the key components of VSNware are network management, VSNware I/O, and application management. The core of the VSNware middleware resides at the gateway.