## 4 Virtualization in WSN and the Concept of Overlay Networks  
The internet was first developed as an overlay network to the traditional telephony system. It used the existing telephone infrastructure to render its services. Thus, overlays have a special history in the evolution of most technological services. Similarly, with the recent ubiquity of WSNs, it has become important to innovate over existing infrastructures in order to use these infrastructures to promote resource sharing. Essentially, Overlay networks are important because they enable transmission of data between end devices without the need to change the underlying hardware. The overlay approach is thus an appealing approach to achieving virtualization in WSN. [PERSON] [115] in an early effort recognized that overlaying a virtual network over existing resources is an effective approach to deploying massive scale WSNs. Most applications and services that run on the overlay network normally execute their tasks concurrently in order to achieve resource sharing. Virtualization at the overlay layer decouples the applications and services from the existing hardware in order to give an illusion that each application task has sole control of the underlying hardware resource, while in effect it is being shared by multiple application tasks. Overlays operate at the edge of the network. They foster a distributed architecture thereby eliminating a single point of failure, which can improve network reliability and management [116]. Two approaches have been presented for the implementation of overlay VWSN (OVWSN), with the first been by [PERSON] [12] in which a gate-to-overlay approach was used and the second by [PERSON] [117] in which a gate to skip graph [118] approach was used. [PERSON] introduced a layered design shown in Figure 7 for WSN virtualization using a gate to overlay layer. The entities in the overlay layer are grouped into logical/virtual groups that are assigned to a specific application. To address some of the shortcomings, the architecture proposed in [12] was further extended to enable interactions between VWSN Infrastructure-as-a-Service (IaaS) and Platform-as-a-Service (PaaS) for the dynamic provision of different applications and services [12]. A base ontology concept was used to build a distributed and highly-deterministic annotation of raw sensor node data in order to allow semantic applications on the VWSN. An empirical based ontology for management and creation of VWSN was discussed in [119]. An advantage of the platform is that it provides scalability in all layers. This is key for future deployments since it does not require re-deployment of the entire network in the event of new agents. The tasks in the virtual layer are loosely coupled with the agents in the overlay network, which can be expanded to multiple networks. The resource-weak nodes at the sensing layer are boosted to a higher capability using the gate-to-overlay node. There are two dedicated communication channels for signaling and data. The data channel allows for IoT-ready lightweight data exchange protocols between the interface layers. The signal path relays the network management and control related parameters, such as initialization and service management. The gate to overlay approach serves as an enabler for legacy and resource constrained nodes to participate in the virtual network area without a major infrastructural change. The drawback with this approach could possibly lie in the complexity of building the gate-to-overlay networks and the congestion and energy requirements of the node to meet the requirements of being a gateway. Dynamic formation of virtual sensing nodes strongly relies on the underlying sensing layer and their capability may be limited, hence the overload on the gate-to-overlay node. [PERSON] [117] on the other hand introduced a hierarchy-based overlay network approach leveraging on the gate-to-skip graph method as a possible approach to large scale distributed overlay networks.