## 5 Implementation Details
### The Key Components of Middleware and Their Relations
SOMM is capable of handling heterogeneous nodes with different capabilities and also because of its use of virtual machines; it is possible to have different platforms with different operating systems in the network if needed. #### 6.2.5 Ease of Use

The only mechanism which Mate and Agilla provide for developing applications is byte code programming. Thus, these middlewares are not very easy to use. A high level language is needed to help programmers with the task of programming. Impala makes the task of programming easy by providing a modular programming API. Cougar and TinyDB offer an easy-to-use database query system for different network operations. These middlewares provide an abstract view of the network to the user as a single entity and make the distribution issues hidden. As a result, the user does not need to deal with low-level APIs in the sensor node. MiLAN helps the programmer with an easy to use approach which is concentrated on high-level abstractions. TinySOA provides a set of web services which programmers can write applications to employ them. This way, programmers can easily obtain network services using any programming language that supports web service communication. Since current implementation of SOMM only comprises byte code, it is not very easy to use; a high level language and programming model for application development are needed in order to simplify the programmer's task. #### 6.2.6 General Purpose

All the mentioned middlewares are general purpose middlewares, excluding Impala which is specially designed for a wildlife tracking project called ZebraNet. SOMM is a special purpose middleware designed to support multimedia transmission in a sensor network. However, it is possible to use this middleware in other types of WSNs. ### Usability Case Study

In this section, we propose a case study to assay the capabilities of SOMM for developing applications for a real world scenario. Consider a sensor network like the one in Figure 1 spread throughout a city. Suppose that the nodes of this network are multimedia nodes with different capabilities. The traffic control organization (TCO) and the police are two clients of this network. The TCO continuously uses the network and collects the traffic information of whole city, but the police use the network only when they need to monitor an area of the city. When the police uses the network, it needs a high quality service and is also takes priority over TCO. We want to use SOMM to develop necessary applications for this scenario. The TCO application which runs continuously must be very energy efficient. Therefore, it provides two types of services. The first service is a low quality service and instead of sending a video stream for its client, it periodically extracts important information such as average speed and number of cars and sends them to its client. It can detect unusual events like accidents and also can search its field of view for a specified car and inform the client. The second service is a video streaming service which streams video to client considering its QoS requirements. Normally, the TCO uses the first service in order to save network's resources. If received information shows an abnormal event like dense traffic or an accident, the TCO employs the second service to precisely monitor that event and make proper decisions. The police needs a tracking service to carry out their missions. This service also should preserve the QoSto where it is possible. Suppose that a car is stolen and the police suspect that the stolen car is in a wide area of the city and therefore it should monitor the whole area to find the car. The police sends the characteristics of stolen car to all the nodes in that area and asks them to announce when they detect the car. When a node detects the stolen car, it informs the police and at this time, the police makes use of the tracking service.