280 likes | 296 Views
This review outlines the design and implementation of SensorWare, a framework for efficient and programmable sensor networks. SensorWare uses lightweight mobile control scripts for dynamic deployment of algorithms on sensor nodes. The framework allows for scripting basic commands and high-level tasks, providing a flexible way to program and deploy algorithms on richer platforms. With a mobile scripting approach, SensorWare enables script migration based on node state and algorithmic instructions. The architecture includes various APIs and modules for sensor interaction, script management, resource metering, and more. SensorWare aims to make sensor networks dynamically programmable with efficient script execution.
E N D
Design and Implementation of a Framework for Efficient and Programmable Sensor Networks Reviewed by: Saswati Swami
SensorWare • A framework for programming Sensor Networks using mobile control scripts • SensorWare employs lightweight and mobile control scripts that are autonomously populated in sensor nodes after a triggering user injection • SensorWare tackles --- How to express an algorithm for Sensor Networks --- How to dynamically deploy the algorithm • Overall provides a flexible way to program and deployalgorithms • Limited to richer platforms (1Mbyte of program memory and 128Kbytes of RAM)
SensorWare Approach Make the node environment scriptable Examples : Define: Basic Building Blocks Basic commands Send packet to the radio Get data from sensing device
SensorWare Approach Make the node environment scriptable How to bind many basic commands into an algorithm? A language core (glue commands) is needed. Examples: Flow control Variable support Expression evaluation A Script
SensorWare Approach Make the node environment scriptable Send packet • Access radio • Find route • Check energy • Queue packet Abstracted high-level description of an algorithm Low-level tasks performed by our system
SensorWare Approach Make scripts mobile Script can populate/migrate Scripts move NOT due to explicit user instructions, but due tonode’s state and algorithmic instructions Language + Run-time Environment = SensorWare
An Example: Target Tracking User is notified for presence of target User reacts by injecting a tracking script
An Example: Target Tracking Script migrates and populates into the area of interest User gets periodic updates of target location Scripts exchange information to compute target location
An Example: Target Tracking As target moves, scripts are migrating User still is notified regularly
SensorWare Language Parts Extensions to the core The glue core The basic script interpreter (stripped-down Tcl) Radio API Timer API Sensor 1 API Mobility API waitcommand idcommand Sensor 2 API GPS API Optional modules . . . . . .
Initialization Exit code Event handler a Event handler b Event handler c Event handler a SensorWare Programming Model a? Zzz c? wait for event a or b or c b? code Example a? Zzz a? Zzz c? b?
SensorWare Run-Time Environment Tasks Fixed tasks Resource Abstraction & Resource Metering Tasks Platform specific Radio/Networking Script Manager (script state keeping, spawns new scripts) Timer service Sensor 1 Admission Control & Policing of Resource Usage Sensor 2 Paging radio . .
Queue SensorWare Run-Time Environment Resource metering info permanent Script related Device related Script Manager Admission Control event interest in event Radio thread system msg. Radio Script 1 OS thread Sensing . . . Sensor HW access code Script n Timer Service
SensorWare Code Structure Changed with platform capabilities Never changed Platform independent code Device Definition code • Register all devices • Define functions for options parsing Script manager Tcl Admission control APIs Device 1 code Code dependency Device 2 code OS specific code • Definition of threads • Definition of msg passing HW access code Changed for porting
SensorWare Script API • replicate < node_list > {variable_name}* • migrate < node_list > {variable_name}* • wait <event_name> <event_data> <msg_sender/msg_body> • < node_list > : destination node addresses • variable_name : a variable name to be passed along with its value to the new script
Multi-User Aggregation The first command tries to replicatethe script to all the neighbors, declaring that this is a multi-userscript. The nodes that the script wasspawned or an “add user” messagewas sent are returned and addedto the need_reply_from variable.
iPAQ 3670 Intel StrongARM 1110 rev 8 32bit at 206Mhz 16Mbytes flash mem 64Mbytes RAM mem OS: v0.5 Linux StrongARM, kernel 2.4.18-rmk3 Compiler: gcc Radio: wavelan card Sensing: Honeywell HMR-2300 Magnetometer SensorWare Implementation Platform
RSC nodes Medusa MK-2 SensorWare Implementation Platform
Execution Times of SensorWare Commands Commands with less than 0.06 ms delay
Execution Times of SensorWare Commands Most time consuming commands
Execution Times of SensorWare Commands Delays of other special commands
SensorWare vs. Mate Similarities • They share the same goal: make a WSN dynamically programmable in an efficient manner • Both are two-level abstraction • Both support code mobility
SensorWare vs. Mate Differences • Mate is for motes, e.g., 128KB PM, 4KB RAM; while SensorWare targets richer platforms like 1MB PM, 128K RAM • Mate is on TinyOS; SensorWare is on Linux • Mate is a stack-based architecture with ultra-compact instruction set; SensorWare builds scripts based on basic blocks • No concurrent apps in one mote; SensorWare supports multi-tasking • SensorWare’s scripts are more powerful than Mate’s capsules