## 2 Virtualization in Wireless Sensor Networks
### Node Virtualization
Examples of these metrics include the type of programming model being adopted by the different platforms, the consideration of resource discovery, the platform type being supported, virtualization level, heterogeneity, platform independence, multi-radio support, programming language and the communication protocols in use. Summarily, our comparison in Table 3 presents a quick view of the viability of different possible platforms available for the effective and efficient virtualization of WSNs. The following are some of the points of interest noted from the comparison in Table 3:  
1. Event-driven programming model is more prevalently adopted for VWSN than the threaded-driven model. The is prevalence may be because VWSN nodes need to stay in the idle or sleep mode and may only be required to transmit data whenever there is a significant change in the parameter(s) being monitored. This typically makes the event-driven model more power  
Figure 4: (a) OS-based Solution (b) Middleware-based solution (c) VM-based solution. Figure 3: Multiple application execution on a single node [28]. preserving than the threaded mode. Thus, nodes can easily send signals at longer time intervals (for example, in 24 h intervals) in order to inform the network about their continuous existence. 2. The event driven model is typically slower in execution than the threaded driven model. This makes it quite poor in managing VWSNs in highly dynamic resource environments [9]. On the other hand, a few notable threaded programming models are more capable of resource discovery, for example, the RIOT platform. For this reason, frameworks such as the RIOT platform are typically encouraged for the implementation of VWSNs. 3. It is noted in Table 3 that some platforms lack resource discovery and publication services, which are very critical requirements in the management of the entry of new nodes into the network. Thus, platforms or frameworks, which are typically desired for VWSNs should possess dynamic management capabilities for efficient resource distribution in virtual environments. 4. Most platforms for VWSN are typically OS based. This implies that there is a greater trend towards the use of OS-based solutions than the use of virtual-machine based solutions. This may be attributed to the higher cost of development associated with using VM than OS based solutions. 5. Based on the examination metrics adopted in Table 3, it is quickly noted that Contiki possesses more desirable characteristics than the other platforms. It notably supports more protocols based on its unique programming model, which enables it to easily combine both the event and threaded driven models. A close competitor to the Contiki platform is the RIOT platform notable for its ability to perform resource discovery. Thus, the Contiki platform may be a more generalized model to adopt in VWSN designs. 6. Most node level virtualization platforms in Table 3 exhibit a strong sense of heterogeneity and platform independency. For example, multi-radio support is only supported in [29; 30; 31], which enables various channels to be utilized leading to a reduction in the network congestion rate. In addition, it is worth noting that the network stack typically used in most platforms comprises of different IoT-enabled protocols that provide internet connectivity to the nodes. Essentially, these lightweight data exchange protocols for IoT paradigms can be clustered into two principal architectures, namely the broker-based [91] and the bus-based architectures [92]. In the broker-based models, the broker mediates between the publisher and subscriber. The broker is also responsible for storing, forwarding, filtering and prioritizing publishing requests. The protocols include MQTT [93], AMPQ, CoAP [94] and JMS [95]. In the bus model, the client publishes specific content to a defined subscriber without a negotiator. These classes of data exchange protocols include DDS [27], REST and XMPP [96]. Virtualized networks thrive with low payload data exchange protocols.