20
Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

Embed Size (px)

Citation preview

Page 1: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

Programming Sensor Networks

Andrew ChienCSE291

Spring 2003

May 6, 2003

Page 2: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

Outline

• Applications Requirements• Programming Challenges• Technology Challenges• Current Approaches• New Directions

Page 3: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

Applications Requirements

• Broad and Amorphous• Tremendous breadth• No single design point

• What are some example requirements…

Page 4: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

Static Sensing Mission

• Examples: industrial, bridge, civil infrastructure, environmental monitoring

• Static Deployment of Sensor network• Limited mission change, evolution• Update dominated by management and

failure/repair• Slow adaptation, configuration acceptable

• Monitor and Activate in response to stimuli• Capture data and process• Stream to base station systems

Page 5: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

Dynamic Sensing Mission

• Examples: disaster response, military or police search, surveillance

• Dynamic deployment of sensor network• Rapid mission change, rapid evolution on

command• Update limited due to short intense

missions, but reconfiguration to changing mission

• Fast adaptation, configuration critical

• Monitor and Activate in response to stimuli• Capture data and process• Process in network and actuate or Stream

to base station systems

Page 6: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

Dynamic Network Structure

• Examples: airborne, water born, vehicle born, zebra born sensornets» Coastal Sensor Networks

• Dynamic deployment of sensor network• Slow mission change, evolution • Rapid network structure change due to

physical movement, environment change, or failures

• Fast adaptation, configuration critical

• Monitor and Activate in response to stimuli• Capture data and process• Process in network and actuate or Stream

to base station systems

Page 7: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

Sensor Network Programming Challenges

• Describe the distributed computation and sensing structures• Manage/Tolerate the irregular and changing network structure

to achieve the computational goal• Reflect the accuracy / capability with which the sensor network

can achieve mission• Detect needs for reconfiguration and repair• Enable optimization of program structure by automatic tools• Enable adaptation of program structure to new configurations

with automatic tools• Enable gracefully degrading behavior with loss of resources and

same source program• Enable energy/resource conservation with techniques such as

sleep/idle• Others?

Page 8: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

Relevant Technologies

• Raise the level» High Level and Declarative Programming

– Tolerance to change, portability

» Parallel computation – Management of Computation/Communication, Concurrency,

and Distribution

– Aggressive compiler control of behavior/implementation

Page 9: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

Relevant Foundations

• Distributed Systems and FT community» Protocols, algorithms, implementation knowledge,

programming techniques

• Embedded and RT systems community» Local tools» Managing resource requirements

Page 10: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

Technology Challenges

• Powered and Limited power• Limited interconnectivity (link, bisection), external

connectivity• Limited coordination• Limited memory • Unreliable nodes• Network evolution (upgrades and failures)

Page 11: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

Current Approaches

• C++ and Embedded SW Engineering• NesC• TinyDB

Page 12: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

C++ & Embedded SW Engin.

• Cyclic executive or Priority Driven scheduler

• Collection of real-time tasks• Manually Manage (some tools)

» Concurrency and correctness

» Memory constraints

» Distributed application structure

» Irregular sensor node distribution

» Sensor network change/evolution

C++

C++

C++

C++

Page 13: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

NesC

• TinyOS like interface with » Call/Event Pairs» Concurrency safety conditions» Type Checking

• Manually Manage» concurrency and correctness (some help)» memory constraints» distributed application structure» Irregular sensor node distribution» Sensornetwork change/evolution

Cmd/Event

Cmd/Event

Cmd/Event

Cmd/Event

Page 14: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

TinyDB

• Relational Model (table of sensor data sources)• Simple Operators• Semantics for transformation / implementation of

Queries» Optimize deployment and implementation for

power • Acquisitional Query processing

» Optimize implementation and data acquisition for power

• Manually Manage» concurrency and correctness (some help)» memory constraints» distributed application structure (some help)» Irregular sensor node distribution (some help)» Sensornetwork change/evolution (some help)

Global Queries

Query Plan and Map

Page 15: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

New Directions

Page 16: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

Spatial Programming

• Spatial structures (processor array) in programming systems

• Spatial structure <-> physical space ?» Fortran D / HPF (imperative,

spatial, explicit optimization/communication management)

Global Program +

Partition Data, Map/Optimize

Page 17: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

Collection Programming

• Collection structures <-> sensor collections?» Nesl» CA/ICC++» Object-oriented Simulation models

• Elements» Collection oriented naming» Collection structuring, indexing» Programmed cooperative behavior» Presumed distribution and

optimization

Global Program +

Map/Optimize

Page 18: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

Data/Communication Oriented

• Local program + communication models which support asynchronous interactions» Tuple Spaces (Linda)» Publish-subscribe» Bulletin Boards

• Data dissemination systems – content-based query systems» Peer to peer systems (gnutella, freenet,

etc.); Content Filtering/ranking systems (OpenCola, others)

• TinyDB implementation techniques or different semantic framework?

• -> we won’t focus on these…

… … …

Point To Point

TupleSpace

Pub-Sub

BulletinBoards

Page 19: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003

Summary / Discussion

• Just scratched the surface on the programming problem

• Low-level mechanisms and relational model provide starting point

• Higher level models common threads» Global views» Imperative control» Explicit decoupling of expression from underlying resources» Expose distribution for compiler managed communication» Support for asynchrony

• Will explore over coming weeks

Page 20: Programming Sensor Networks Andrew Chien CSE291 Spring 2003 May 6, 2003

CSE 291 Sensor Networks – 5/6/2003