Sign up & Download
Sign in

Macro-programming Wireless Sensor Networks using Kairos

by Ramakrishna Gummadi, Omprakash Gnawali, Ramesh Govindan
Work (2005)

Abstract

The literature on programming sensor networks has focused so far on providing higher-level abstractions for expressing local node behavior. Kairos is a natural next step in sensor network programming in that it allows the programmer to express, in a centralized fashion, the desired global behavior of a distributed computation on the entire sensor network. Kairos compile-time and runtime sub-systems expose a small set of programming primitives, while hiding from the pro- grammer the details of distributed-code generation and instantiation, remote data access and management, and inter-node program ow coordination. In this paper, we describe Kairos programming model, and demonstrate its suitability, through actual implementation, for a variety of distributed programsboth infrastructure services and signal processing taskstypically encountered in sensor network literature: routing tree construction, localization, and object tracking. Our exper- imental results suggest that Kairos does not adversely affect the performance or accuracy of distributed programs, while our implementation experiences suggest that it greatly raises the level of abstraction presented to the programmer.

Cite this document (BETA)

Available from www.springerlink.com
Page 1
hidden

Macro-programming Wireless Sensor Networks using Kairos

Macro-programming Wireless Sensor Networks using
Kairos
Ramki, Om, Ramesh
Abstract
The literature on programming sensor networks has,
by and large, focused on providing higher-level ab-
stractions for expressing local node behavior. Kairos
is a natural next step in sensor network program-
ming in that it allows the programmer to express, in
a centralized fashion, the desired global behavior of
a distributed computation on the entire sensor net-
work. Kairos’ compile-time and runtime subsystems
expose a small set of programming primitives, while
hiding from the programmer the details of distributed
code generation and instantiation, remote data access
and management, and inter-node program flow co-
ordination. Kairos’ runtime is greatly simplified by
assuming eventual consistency in node state; this as-
sumption underlies many practical distributed com-
putations proposed for sensor networks. In this pa-
per, we describe Kairos’ programming model, and
the flexibility and robustness it affords programmers.
We demonstrate its suitability, through actual imple-
mentation, for a variety of distributed programs—
both infrastructure services and signal processing
tasks—typically encountered in sensor network liter-
ature: routing tree construction, localization, and ob-
ject tracking. Our experimental results suggest that
Kairos does not adversely affect the performance or
accuracy of distributed programs, while our imple-
mentation experiences suggest that it greatly raises
the level of abstraction presented to the programmer.
1 Introduction and Motiva-
tion
Wireless sensor networks research has, till date,
made impressive advances in platforms and
software services [1, 2, 3]. The utility and
practicality of dense sensing using wireless sen-
sor networks has also been demonstrated re-
cently [4, 5, 6]. It is now time to consider an es-
sential aspect of sensor network infrastructure—
support for programming wireless sensor net-
work applications and systems components at
a suitably high-level of abstraction. Many of
the same reasons that have motivated the re-
design of the networking stack for sensor net-
works (energy-efficiency, different network use
models) also motivate a fresh look at program-
ming paradigms for these networks.
Two broad classes of programming models
are currently being investigated by the commu-
nity. One class focuses on providing higher-
level abstractions for specifying a node’s lo-
cal behavior in a distributed computation. Ex-
amples of this approach include the recent
1
Page 2
hidden
work on node-local or region-based abstrac-
tions [7, 8]. By contrast, a second class consid-
ers programming a sensor network in the large
(this has sometimes been called macroprogram-
ming). One line of research in this class enables
a user to declaratively specify a distributed com-
putation over a wireless sensor network, where
the details of the network are largely hidden
from the programmer. Examples in this class
include TinyDB [9, 10], and Cougar [11].
Kairos’ programming model specifies the
global behavior of a distributed sensornet com-
putation using a centralized approach to sen-
sornet programming. Kairos presents an ab-
straction of a sensor network as a collection of
nodes (Section 3) that can all be tasked together
simultaneously within a single program. The
programmer is presented with three constructs:
reading and writing variables at nodes, iterating
through the one-hop neighbors of a node, and
addressing arbitrary nodes. Using only these
three simple language constructs, programmers
implicitly express both distributed data flow and
distributed control flow. We argue that these
constructs are also natural for expressing com-
putations in sensor networks: intuitively, sensor
network algorithms process named data gener-
ated at individual nodes, often by moving data
to other nodes. Allowing the programmer to
express the computation by manipulating vari-
ables at nodes allows us to almost directly use
“textbook” algorithms, as we show later in de-
tail in Section 3.2.
Given the single centralized program, Kairos’
compile-time and runtime systems construct and
help execute a node-specialized version of the
compiled program for all nodes within a net-
work. The code generation portion of Kairos
is implemented as a language preprocessor add-
on to the compiler toolchain of the native lan-
guage. The compiled binary that is the single-
node derivation of the distributed program in-
cludes runtime calls to translate remote reads
and, sometimes, local writes into network mes-
sages. The Kairos runtime library that is present
at every node implements these runtime calls,
and communicates with remote Kairos instances
to manage access to node state. Kairos is
language-independent in that its constructs can
be retrofitted into the toolchains of existing lan-
guages.
Kairos (and the ideas behind it) are related
to shared-memory based parallel programming
models implemented over message passing in-
frastructures. Kairos is different from these
in one important respect. It leverages the ob-
servation that most distributed computations in
sensor networks will rely on eventual consis-
tency of shared node state both for robustness
to node and link failure, and for energy effi-
ciency. Kairos’ runtime loosely synchronizes
state across nodes, achieving higher efficiency
and greater robustness over alternatives that pro-
vide tight distributed program synchronization
semantics (such Sequential Consistency, and
variants thereof [12]).
We have implemented Kairos as an extension
to Python. We describe our implementation of
the language extensions and the runtime system
in Section 4. On Kairos, we have implemented
three distributed computations that exemplify
system services and signal processing tasks en-
countered in current sensor networks: construct-
ing a shortest path routing tree, localizing a
given set of nodes [2], and object tracking [13].
We exhibit each of them in detail in Section 3 to
2

Sign up today - FREE

Mendeley saves you time finding and organizing research. Learn more

  • All your research in one place
  • Add and import papers easily
  • Access it anywhere, anytime

Start using Mendeley in seconds!

Already have an account? Sign in

Readership Statistics

20 Readers on Mendeley
by Discipline
 
 
 
by Academic Status
 
60% Ph.D. Student
 
10% Post Doc
 
10% Lecturer
by Country
 
30% United States
 
10% United Kingdom
 
10% Germany

Groups

pool
All 2007