## 3 Novel Taxonomy for SSNs
### Low Level Virtualization
#### 3.1.3 LLV Based on Middleware Solutions  
SSNs middleware are designed to overcome the heterogeneity among the different types of sensors to facilitate the concurrent application development and operation. This section will briefly discuss the middleware approaches, which provide hardware abstraction and hide the heterogeneity of sensor nodes in LLV. * **Impala**[48]: is a lightweight runtime middleware for resource constrained systems as WSNs, it was a part of ZebraNet [49] project that aims to provide an improved tracking technology with efficient energy utilization and to improve system reliability, performance, and energy-efficiency. It provides a good programming interface and it supports multiple applications, but only allows one application to run at a time based on event-based programming model. It aims to enable applications' modularity, adaptivity, and repairaability in WSNs. It also allows for dynamically applying software updates to the sensors and to the running system. It provides an interface for on-the-fly applications adaptation in order to improve the performance, energy-efficiency, and reliability of the software system. The impala system architecture consists of two layers: the upper one contains all the application protocols and programs for ZebraNet project, which are responsible for gathering environmental information, and then routing it to a centralized base station, while the lower layer contains three agents: (1) Application Adapter, which adapts the application protocols to different runtime conditions to improve performance, energy-efficiency, and robustness based on application and system parameters that are defined to represent the runtime states; (2) Application Updater, which receives and propagates software updates and then installs them on the node; and, (3) the Event Filter, which captures and dispatches events to the above system units and initiates chains of processing. Additionally, Impala has five types of events: timer event, packet event, send done event, data event, and device event, if multiple events arrive, they are processed in a sequential way. The performance of Impala was evaluated while using modern mobile computing devices (HP/Compaq iPAQ Pocket PC handhelds) to test its overhead in real sensor networks. It measures its overhead in event delivery and processing. The results show that Impala events occur less frequently than application events. The time required for routing is reduced by 15% less than applications not using it, while the protocol switching cost is reduced by twice per day for a sensor node. * **Agilla**[19]: is the first mobile agent middleware for self-adaptive applications that operate in resource-constrained WSNs platforms, it was implemented on top of TinyOS. Its programming model is unique based on agent migration. The Base station represents the application codes as mobile agents and injects them into the network, which can migrate themselves to the sensor nodes that are only relevant to that application, by this way the communication cost is reduced by moving the processing code to the data, rather than gathering it to a central node. Mobile agents have a stack space, a heap, and three registers, which are used to store the ID of the agent, the program code, and the condition code. Every agent, including the clones, has a unique ID. Agilla's model, Figure 14, was designed to provide an adaptive behavior in SSNs, where each node can support different mobile agents. A mobile agent can be migrated from one node to another with one hop at a time, it may be migrated as a clone where a copy of it is transferred and executed at the new node while keeping running on the source node, or it may be migrated as a move where a copy of it is transferred and executed at the new node while no longer being run on the source node. The sensor nodes can support up to four agents at the same time. Thus, Agilla can support the execution of concurrent applications. Figure 15 displays that Agilla architecture consists of three layers.