## 5 Conclusions  
The communication protocol used by the WSN nodes, mentioned in the previous sections, is part of the nSOM middleware and enables its components to interoperate with each other. It is not standard, however, but it is quite similar to COAP as they both observe the ROA principles and avoid increasing the network or the node computational overhead significantly. Therefore, a significant improvement should be replacing the nSOM protocol by COAP, as the latter is a standard one recommended in several IoT based solutions. Nonetheless, COAP messages should be embedded straight to MAC layer frames, similar to the proposal in [17], to counter the negative impact on the performance of the COAP protocol stack, normally handled over TCP/IP.  
Another significant issue that would leverage system interoperability is the pervasive use of semantic annotations, complying with well-accepted ontologies. One of the most overwhelming activities when integrating solutions from different stakeholders is mapping each one's information models. The system components must interchange semantically annotated data complying with a reduced set of well-accepted ontologies to overcome such drawbacks. Thus, providing the recipient with enough knowledge for unambiguous data processing is granted.  
Regarding service composition, it should be kept in mind that it is one of the proposed design patterns for Service Oriented Architectures [18]. As an _Orchestrator_ has been designed and developed, the importance of orchestration and choreography should be acknowledged, as they are two typical, well-established ways to design a service composition [19].  
In the proposed model the orchestration concept has been selected, as it requires no extra capabilities in the already deployed basic sensors. A basic set of rules (capable of creating composed services for obtaining the average mean of a set of measurements, and creating new events when the measurements of the sensors go beyond certain threshold) has been defined. An additional rule has been added to the set so the composed service can also generate an event when the rate of change in the measurements exceeds some value.  
The intention of this paper is proving that even constrained devices can be capable of composing some basic composed services, but the extension of this set of rules, allowing the creation of more complex services using any set event sources and/or other non-event service providers, remains as a task to be fully explored.  
It is interesting to consider other works, as the HERMES proposal [20], to extend and improve the capabilities of our middleware proposal in the event management area. Although our interest in the virtualization goes beyond the basic aggregation, there are some interesting innovations in the publish/subscribe systems that can be of use to improve the results shown in this paper [21].  
Considering again [19], the other typical way of composing a service is the choreography. Choreography implies that the sensors which have already been or are going to be deployed have also certain additional capabilities. However, unlike the orchestrator, the only responsibility of the choreographer is sharing some instruction sets to the service providers that are going to participate in the composed service. Even so, the exploration of choreography techniques applicable to the virtualization of WSNs is an interesting challenge.  
Finally, there is also some work to be done with the communications. Some ideas that were proposed in the HERMES middleware [20] can be explored for their integration in nSOM. Also, communications can be synchronized in some scenarios [22], opening another path for exploration.