This paper introduces SAMSON (Self-Adaptive Middleware for wireless SensOr Networks), an instance of a Reference Architecture (RA) that was designed to manage wireless sensor networks (WSN) in an autonomic way by enabling runtime adaptation of nodes' behavior according to context changes, application requirements, and predefined adaptation policies. In this paper, we propose a process, supported by model-driven transformations to generate SAMSON from the RA specification. The model-driven transformations are used to map each element of the RA specification to software components and to generate the source code to be deployed in a target WSN platform. We evaluate our proposal by presenting four application scenarios where SAMSON was employed to optimize the network lifetime and to react to runtime events according to adaptation policies previously defined by software architects and network administrators. Evaluation results shown that SAMSON was able to dynamically adapt the behavior of sensor nodes, to efficiently use the hardware resources, and to increase the WSN lifetime.
['Jesús M. T. Portocarrero', 'Flávia Coimbra Delicato', 'Paulo F. Pires', 'Taniro Rodrigues', 'Thaís Vasconcelos Batista']
SAMSON: self-adaptive middleware for wireless sensor networks