Nano-CF: A Coordination Framework for Macro-programming in Wireless Sensor Networks

Nano-CF allows multiple applications written by
different programmers to be executed simultaneously on a sensor networking
infrastructure. This framework enables the use of a common sensing
infrastructure for a number of applications without the users being concerned
about the applications already deployed on the network. The framework also
supports timing constraints and resource reservations using the Nano-RK
operating system. Nano-CF is efficient at improving WSN performance by
(a) combining multiple user programs, (b) aggregating packets for data delivery,
and (c) satisfying timing and energy specifications using Rate-Harmonized
Scheduling. Using representative applications, we demonstrate that Nano-CF
achieves 90% reduction in Source Lines-of-Code (SLoC) and 50% energy
savings from aggregated data delivery.
Image(architecture.png, 600px)

Image(system_design.png, 450px)

Nano-CL: Nano Coordination Language

We designed an imperative-style language
called Nano-CL (Nano Coordination Language) that provides a unified interface to
users for writing sensor networking applications. The language has been designed
to meet the following design goals:

  • The language should provide an abstraction from the lower-level details of the sensor networking OS and radio communication.
  • The language design should facilitate the extraction of timing and communication properties from user-written applications.
  • The syntax of the language should be simple and easy for non computer-scientists to understand and program.
    Each Nano-CL
    program is composed of two important sections: Job descriptor and Service
    descriptor.

In Nano-CL, the user writes a service which is functionally equivalent to a
task that is to be executed on each node. Nano-CL consists of a
set of primitives and programming constructs which provide sufficient capability
for programming the sensor nodes, as well as, an abstraction from the lower-level
implementation details of the operating system and radio
communication. Each service descriptor specifies the
functionality of one task. The syntax for a service descriptor is similar to
@C'-like sequential programming, where the user can make use of pre-defined library
functions to interact with the sensor hardware. The return value from the
service corresponds to the data value that the user wishes to collect from the
sensor nodes, and unlike the usual practice, more than one data value can be
returned. The framework converts the user program in service descriptor into
byte-codes, which are then sent over the wireless network to be interpreted
and executed at each node.

Image(nanocl_old.png, 500px)

A programmer can write multiple services and then each service can be mapped to a
set of nodes in the job descriptor. The job descriptor section can have more
than one service call where each call has the associated timing properties specified
by the user. The timing properties include the periodic rate at which the
service should repeat at each node and the maximum allowable deviation from the
specified period. This deviation allows the framework to @@batch" tasks
together on sensor nodes, as well as, schedule the transmissions together to
reduce the overhead associated with switching on/off the radio and processor.

An Example program written in Nano-CL is shown below:

 JOB:
occup_monitor <L1,L2,L3,L4> <20s,5s> SUM
temp_collect <L1,L2,L3,L4> <50s,0s> NOAGG
 END

 SERVICE:
occup_monitor uint8
int16 light_sense, audio_level;
int32 sum;
int8 cnt, thresh;
sum = 0;
cnt = 10;
thresh=40;
for (i=1:cnt) 
    light_sense = gets(LIGHT);
    audio_level = gets(AUDIO);
    sum = sum + light_sense/100;
    sum = sum + audio_level/100;
    wait(1s);
endfor
if(sum/cnt > thresh)
    return 1; // Return 1, if room is occupied
else
    return 0;
endif
  END

 SERVICE:
 temp_collect uint16
 return gets(TEMP);
 END

nanocl_old.pdf - Nano-CL (132.7 kB) Vikram Gupta -, 04/27/2011 02:33 pm

system_design.pdf - System (781.5 kB) Vikram Gupta -, 04/27/2011 02:34 pm

architecture.png - Architecture (395.4 kB) Vikram Gupta -, 04/27/2011 07:36 pm

nanocl_old.png - nanocl (219.7 kB) Vikram Gupta -, 04/27/2011 07:47 pm

system_design.png - System Design (84.6 kB) Vikram Gupta -, 04/27/2011 07:48 pm