OASiS: A Programming Framework for Service-Oriented Sensor Networks 1 Manish Kushwaha, Isaac Amundson, Xenofon Koutsoukos, Sandeep Neema, Janos Sztipanovits Institute for Software Integrated Systems (ISIS) Vanderbilt University Nashville, TN 37235, USA {manish.kushwaha, isaac.amundson, xenofon.koutsoukos, sandeep.neema, janos.sztipanovits}@vanderbilt.edu Abstract— Wireless sensor networks consist of small, inexpen- sive devices which interact with the environment, communicate with each other, and perform distributed computations in order to monitor spatio-temporal phenomena. These devices are ideally suited for a variety of applications including object tracking, environmental monitoring, and homeland security. At present, sensor network technologies do not provide off-the-shelf solutions to users who lack low-level network programming experience. Because of limited resources, ad hoc deployments, and volatile wireless communication links, the development of distributed applications require the combination of both application and system-level logic. Programming frameworks and middleware for traditional distributed computing are not suitable for many of these problems due to the resource constraints and interactions with the physical world. To address these challenges we have developed OASiS, a programming framework that provides abstractions for object- centric, ambient-aware, service-oriented sensor network appli- cations. OASiS uses a well-defined model of computation based on globally asynchronous locally synchronous dataflow, and is complemented by a user-friendly modeling environment. Appli- cations are realized as graphs of modular services and executed in response to the detection of physical phenomena. We have also implemented a suite of middleware services that support OASiS to provide a layer of abstraction shielding the low-level system complexities. A tracking application is used to illustrate the features of OASiS. Our results demonstrate the feasibility and the benefits of a service-oriented programming framework for composing and deploying applications in resource-constrained sensor networks. I. I NTRODUCTION Wireless sensor networks (WSNs) are inherently dynamic in nature due to node mobility, limited resources, and un- reliable communication links. It is therefore imperative that WSN applications consider these issues in order to ensure their correct execution. Unfortunately, tackling the problem of dynamic network behavior places a substantial burden on the programmer. In addition to an application’s core functionality, the programmer must implement low-level operations such as robust communication protocols, resource management algorithms, and fault tolerance mechanisms. Unlike traditional network programming, WSN programming requires a coupling between application-level and system-level logic for resource management and sensing operations. Not only does the im- plementation of these components require substantial time and 1 OASiS is partially supported by Microsoft External Research, NSF grant CCR-0225610, and grant ARO SA5212-11087. effort on behalf of the programmer, but it also increases the risk of deploying incorrect code, due to the often unanticipated behavior of distributed network applications. In this paper, we present OASiS, an O bject-centric, A mbient-aware, S ervice-oriented S ensornet programming framework which enables the development of WSN appli- cations without having to deal with the complexity and un- predictability of low-level system and network issues. The framework provides a well-defined model of computation based on globally asynchronous locally synchronous dataflow [1], and is complemented by a user-friendly modeling environ- ment. OASiS decomposes specified application behavior and generates the appropriate node-level code for deployment onto the sensor network. In object-centric programming, an object is a logical el- ement which represents some physical phenomenon being monitored by the network. The application is driven by the object, and its behavior is governed by the object’s current state. The programmer is able to specify this behavior from the viewpoint of the object, and need not worry about how the behavior is implemented at the node level. Object-centric programming by itself does not address the issues of network failures and dynamic network topology. Ambient-aware programming [2] has emerged as a paradigm for mobile computing in which each node in the network has up-to-date knowledge of its neighborhood. This includes awareness of its neighbors and the services they provide. OASiS takes a service-oriented approach to behavioral decomposition and application execution. In a service-oriented WSN application, each activity (sensing, aggregation, service discovery, etc.) is implemented as a separate service. The advantages of using a service-oriented architecture for WSN applications are similar to those of Web services. Services are modular, autonomous, and have well-defined interfaces which allow them to be described, published, discovered, and invoked over a network. These properties permit services to be dynamically composed into complete applications. We have developed a suite of middleware services which support such object-centric, ambient-aware, service-oriented applications. The services include components for managing internal sensor node operations, communication, service dis- covery, and object maintenance. The middleware serves as a layer of abstraction, shielding the programmer from the low-