Friday, February 02, 2007

Regiment – Wireless Sensor Network Macroprogramming Language

One can view a Wireless Sensor Network as a series of nodes in which each one must be programmed individually, or one can view the collection of nodes as a single entity. Regiment is a macroprogramming language that follows the latter approach. In this
paper, the authors describe Regiment which uses region streams to represent a collection of nodes in a geographical area.

No one doubts that high-level programming abstracts away many of the lower level components of a computer. Advocates of Regiment argue the same holds true for programming a large, wireless sensor network.

Regiment translates high-level language into a token machine language. In a token machine language, each node operates on a token message passed to it or generated inside it. The term macroprogramming means treating the network as a single entity rather than each node.

Regiment is based on three concepts – signals, spaces, and events. Signals are the time-varying signals the nodes capture from their environment. Spaces is the distribution of data across a network. Events notify the network of meaningful changes to Streams such as triggers. Streams and Events vary over time, while Spaces varies over location.

Areas, Regions, and Anchors are additional concepts used to describe a network. An Area describes collections of data. A Region represents the physical state of the network. An Anchor node acts as a leader for a subset of nodes to act as a reference point for determining membership of nodes in the Region. The key to making the system robust is to allow an Area’s value to vary over time.

In this paper the authors rate various middleware approaches on the following points:

Power awareness
Ease of Use

Macroprogramming approaches such as Regiment rated a “Partial” across the board which is “medium” by most standards. In other words, it has no glaring deficiencies, but is not superlative on any point either.

A group of researchers in Cambridge, Mass, outfitted the city streetlights with wireless sensor nodes which they called CitySense. The nodes were powered by photocells but they used 802.11 to provide enough signal strength to reach from one streetlight to the other. Each node measures temperature, humidity, wind direction, and speed.

The researchers used a Regiment-like programming language to run the network. In implementing it they used a data model which they call the “hourglass.” In it they differentiate between streams of data and control messages. They place the control messages in a “circuit-like” fashion in order for nodes to communicate with their neighbor for setting up groups or establishing data paths for the signals. A “circuit” uses less bandwidth and thus less power.

It’s an interesting application and demonstrates that Regiment can be used in real-world applications.

Best regards,
Hall T.