## 3 Novel Taxonomy for SSNs
### SSNs Using Hybrid Level Virtualization
#### 3.3.1 Hybrid Virtualization Based on Middleware/Cluster Based Solutions  
This branch handles the node level using middleware while handling the high level by clustering sensors into multiple groups. As in:  
* **Sensomax**[79]: is a middleware solution that supports multiple concurrent applications in SSNs. It is based on two levels of virtualization; the first level is network level at which the network is participated into clusters, and each cluster contains a cluster head and multiple members, each cluster may be dedicated to a single or multiple applications, and treated as a single entity by the application developer, the sensor nodes may play multiple roles where it could be a cluster head for an application and serve another application as a member node. By this way, the applications can be span over multiple clusters, which is by running the agent associated to the application on these clusters, as in Figure 37.  
The second level of virtualization is the node level at which the applications are coded as agents that are allocated in an execution space and loaded when the associated applications start to run, as in Figure 38. An agent will be loaded to the execution space when running a relevant application triggers it; thus, if multiple applications are running concurrently, Sensomax provides a resource-allocation algorithm to allocate resources among the running agents in the execution space. There are three types of resources; the global resources that represent all shared resources over the network, the local resources that represent the shared resources inside the cluster and system resources represent the status of the reserved resources. There are three  
Figure 36: Hybrid Solutions of SSNs.  
Figure 37: Sensomax Clusters.  
types of agents that are used to handle the varity of communication levels: the global agents handle communications among clusters, local agents are responsible for handling the inter-cluster communication, and the system agents handle the reprogramming of sensor nodes on the fly. The performance of Sensomax was evaluated by a network prototype of 12 sensor nodes and by simulation. The results showed that the execution time for an agent is 200 ms if concurrent applications are served by that node, and this time increases as the number of applications increase. The execution time of dynamic update is lower than 100 ms for the same number of applications.
* **Multi-set Architecture for Multi-applications Running on WSNs**[80]: it presents a multi set architectural model for concurrent application running on SSN. The HLV is based on grouping sensor nodes into clusters with cluster heads, which are responsible for propagating the configuration agent that is inherited from the base station to the member nodes, here each cluster serves only one application, therefore the number of hosted application in this type of SSN is equal to the number of created clusters, and thus their execution priorities must be known before the operation starts and this limits the flexibility. While, for LLV that is based on a middleware running on the top of the operating system \"TinyOS\", the middleware architecture uses two mobile agents, called Configuration Agent (C-Agent) and Switching Agent (S-Agent), as shown in Figure 39. These agents are used to control the functionality of LLV and NWLV, respectively. The base station starts the system operation by injecting the C-Agent into the WSN that propagates to the cluster heads to form the clusters. One application is run at a time, thus only one cluster is runs at a time while the others are in a sleep mode, and the S-Agent is used to control the wake-up/sleep switching between clusters. The performance evaluation was not presented for this architecture.