Dynamic Macroprogramming of Wireless Sensor Networks with Mobile Agents

Wireless Sensor Networks (WSNs) are a key enabling technology for Ambient Intelligence. Macroprogramming has been proposed as a technique for facilitating programming WSNs, but current solutions do not provide the combination of dynamicity and query specification that would be useful to domain experts. We have implemented the first query engine which provides both these features. Our system leverages AI methods such as multiagent systems and sophisticated meta-level knowledge representation techniques to keep track of the domain knowledge and to enable adaptation in query processing. Such adaptations include dynamic representations, transformations, optimizations and deployment strategies translating queries into a system of automatically generated mobile actors in a WSN. The infrastructure for Ambient Intelligence (AmI) [IST, 2003] will include a massive deployment in everyday environments of Wireless Sensor Networks (WSNs) consisting of autonomous, spatially distributed, tiny, low-powered computers, endowed with communication, sensing and ac-tuating capabilities [Whitehouse et al., 2006; Luo et al., 2006]. To realize this vision, WSNs must provide an omnipresent interactive environment. Our goal is to support the exploitation of an AmI infrastructure by ordinary end-users, not embedded systems programmers. Macroprogramming has been proposed as a technique for facilitating programming WSNs. Macroprogramming enables the specification of a given distributed computation as a single global specification that abstracts away low-level distribution. The programming environment first automatically compiles this high-level specification into the relatively complex low-level operations that are implemented by each sensor node, and then deploys and executes these operations [Mainland et al., 2004]. As explained in [Razavi et al., 2006a], we are interested in situations where both the users' requirements and the WSN environment may be dynamic. This goal matches the diversity of functionalities that end-users need from the ambient infrastructure, further amplified by the unpredictability of the phenomena being monitored and the potential changes in the ambient computing infrastructure. We develop a high-level language which supports WSN macro-programs called uQueries. A uQuery is represented and executed using uQuery Engines. Thus the key challenge is to support the cost-effective and stepwise development of uQuery Engines. In particular, this requires enabling uQuery specifications by multiple concurrent and uncoordi-nated end-users. It also requires deploying and executing such specifications in a parallel and resource-efficient manner which ensures interoperability with other uQuery engines. In this paper, we focus primarily on representation (Section 3) and execution of uQueries (Section 4). uQueries result in a system of dynamically created meta-actors which generate actors that are concurrently …