Configuring a Context-Aware Middleware for Wireless Sensor Networks

Nadia Gámez, Javier Cubo, Lidia Fuentes, Ernesto Pimentel
2012 Sensors  
In the Future Internet, applications based on Wireless Sensor Networks will have to support reconfiguration with minimum human intervention, depending on dynamic context changes in their environment. These situations create a need for building these applications as adaptive software and including techniques that allow the context acquisition and decisions about adaptation. However, contexts use to be made up of complex information acquired from heterogeneous devices and user characteristics,
more » ... ing them difficult to manage. So, instead of building context-aware applications from scratch, we propose to use FamiWare, a family of middleware for Ambient Intelligence specifically designed to be aware of contexts in sensor and smartphone devices. It provides both, several monitoring services to acquire contexts from devices and users, and a context-awareness service to analyze and detect context changes. However, the current version of FamiWare does not allow the automatic incorporation related to the management of new contexts into the FamiWare family. To overcome this shortcoming, in this work, we first present how to model the context using a metamodel to define the contexts that must to be taken into account in an instantiation of FamiWare for a certain Ambient Intelligence system. Then, to configure a new context-aware version of FamiWare and to generate code ready-to-install within heterogeneous devices, we define a mapping that automatically transforms metamodel elements defining contexts into elements of the FamiWare family, and we also use the FamiWare configuration process to customize the new context-aware variant. Finally, we evaluate the benefits of our process, and we analyze both that the new version of the middleware works as expected and that it manages the contexts in an efficient way. OPEN ACCESS Sensors 2012, 12 8545 Keywords: context-aware; WSN; middleware; model-driven; configuration; AmI; AAL is urgently needed to develop innovative Context-Oriented Programming (COP) mechanisms [9] . On the one hand, recent research efforts have tackled the context management in WSNs at middleware level instead of application level [10] [11] [12] [13] [14] [15] [16] [17] in order to provide reusable solutions for different applications. However, AmI applications are composed of different heterogeneous devices, and although many context situations can be similar (as movement detection in the smarthomes), these contexts could not be obtained in the same way. For instance, due to the structure of a house, an application can consider seven movement detectors while another one only considers four detectors. Thus, these kinds of applications have a common core asset and a variable part, so it can greatly benefit from Software Product Lines (SPLs) engineering [18], since it is specifically focused on variability modelling. Then, we propose to use FamiWare [19], a family of context-aware middleware built using SPL. In such a way, both complex contexts acquired by heterogeneous devices and the communication of context information among those devices of the AmI system are handled by FamiWare in a transparent way. On the other hand, we propose to use models to specify the context information for WSNs by using the UML common language. Specifically, we base on the ContextUML metamodel [20] , an UML-based modeling language for model-driven context-aware services development, which provides a flexible design of context-aware services. It separates the modeling of context and context-awareness from service components by making easier both development and maintenance of these services. Then, in this work we present a model-driven process to build context-aware applications based on FamiWare. The contexts for these applications will be specified using ContextUML, and by means of the defined mapping between ContextUML and FamiWare a new augmented version of the FamiWare family with the incorporation of new contexts will be automatically created. Then, taking as input the specific requirements of the system about every device, the network (e.g., number of devices) and the necessities of the application (e.g., security) we will obtain automatically the FamiWare code ready-to-install for every device of the system. Therefore, the main contributions of our work are the following:
doi:10.3390/s120708544 pmid:23012505 pmcid:PMC3444063 fatcat:vx5xhgibobgznfhzlqsi2rtj74