Top Banner
Software Challenges Software Challenges in in Wireless Sensor Networks Wireless Sensor Networks Jeremy Elson Jeremy Elson Microsoft Research Microsoft Research IPSN/SPOTS Tutorial IPSN/SPOTS Tutorial Wednesday, April 27, 2005 Wednesday, April 27, 2005
28

Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Mar 27, 2015

Download

Documents

Haley Jacobs
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Software ChallengesSoftware ChallengesininWireless Sensor NetworksWireless Sensor Networks

Jeremy ElsonJeremy ElsonMicrosoft ResearchMicrosoft Research

IPSN/SPOTS TutorialIPSN/SPOTS TutorialWednesday, April 27, 2005Wednesday, April 27, 2005

Page 2: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

OutrageousOutrageous(?)(?) Opinion Tutorial Opinion Tutorial

Outrageous opinion surveyOutrageous opinion survey– A dozen contributorsA dozen contributors– Ideas that deserve credit are theirs, blame for Ideas that deserve credit are theirs, blame for

dumb ideas is minedumb ideas is mine

More questions than answersMore questions than answers

Basic question: Basic question: Why is writing software for Why is writing software for sensor networks so hard?sensor networks so hard?

Some examples of ongoing researchSome examples of ongoing research

Page 3: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

IsIs it hard? it hard?

Internet:Internet:– Cost of new devices is really just the deviceCost of new devices is really just the device– Pressure is on hardware designers – smaller, Pressure is on hardware designers – smaller,

cheaper, fastercheaper, faster– We can network every node that existsWe can network every node that exists

Far more motes exist than we can networkFar more motes exist than we can network– 100,000 (?) exist100,000 (?) exist– Biggest networks, ~100 or maybe ~1000Biggest networks, ~100 or maybe ~1000– Why is this?Why is this?

Page 4: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Can we just blame hardware?Can we just blame hardware?

Energy is “non-negotiable”Energy is “non-negotiable”– Un-tethered sensing is the reason we’re hereUn-tethered sensing is the reason we’re here– Will always limit radio ranges, link qualitiesWill always limit radio ranges, link qualities

““Architecture challenges” come somewhere in Architecture challenges” come somewhere in between hardware and softwarebetween hardware and software– e.g., how do we structure hierarchies?e.g., how do we structure hierarchies?– Billions of PCs can’t be wrong!Billions of PCs can’t be wrong!

Even with the right structure, it’s harderEven with the right structure, it’s harder– Why?Why?

Page 5: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Worst of All WorldsWorst of All Worlds

“Text”

Timing-Dependent

Data

Real-WorldSensorInputs

Single- or Few-Threaded

Multi-Threaded

OS Kernels/Device Drivers

MS Wordcat

Robotics SensorNetworks

Distributed,Timing Dependent System

MPI/Linda

DistributedRobotics

Squid

TCP

System Uncertainty

DataUncertainty

Page 6: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Big Challenge 1:Big Challenge 1:Visibility, Visibility, Visibility!Visibility, Visibility, Visibility!

Of a dozen sensor network Of a dozen sensor network researchers polled, 10 listed researchers polled, 10 listed

“debugging support” in some form “debugging support” in some form as a core challengeas a core challenge

Page 7: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Visibility, visibility, visibility…Visibility, visibility, visibility…

Ground truth is hard to capture, even with Ground truth is hard to capture, even with unlimited capacity systems unlimited capacity systems – – damn you, real world!damn you, real world!

– We want to interpret responses to stimuliWe want to interpret responses to stimuli– The stimuli, not the sensor outputs, are ground truthsThe stimuli, not the sensor outputs, are ground truths

The lab is not the same as the fieldThe lab is not the same as the field– Things that worked in the lab don’t work during Things that worked in the lab don’t work during

deploymentdeployment– Bugs in MAC layers, positioning errors, non-Guassian Bugs in MAC layers, positioning errors, non-Guassian

noise…noise…

It’s also hard to modelIt’s also hard to model– Models are appearing (e.g., Cerpa, Whitehouse)Models are appearing (e.g., Cerpa, Whitehouse)– But notice that models are highly environment-specificBut notice that models are highly environment-specific

Page 8: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Visibility, visibility, visibility…Visibility, visibility, visibility…

The differences have The differences have substantial effectssubstantial effects– If only I had $100 for every routing algorithm If only I had $100 for every routing algorithm

designed with a circular radio modeldesigned with a circular radio model– I still couldn’t afford to buy a circular radioI still couldn’t afford to buy a circular radio

Observing reality concurrent with design Observing reality concurrent with design should be mandatoryshould be mandatory– Brings us back to needing visibilityBrings us back to needing visibility

Page 9: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Visibility, visibility, visibility…Visibility, visibility, visibility…

Even traditionally easy-to-observe things Even traditionally easy-to-observe things (e.g. messages, states) become hard to (e.g. messages, states) become hard to capture, because…capture, because…

Debugging information is now huge Debugging information is now huge compared to data, instead of the opposite compared to data, instead of the opposite (vs. Internet)(vs. Internet)

You can’t store it on Mote-sized devices, You can’t store it on Mote-sized devices, eithereither

Page 10: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Simulators, Emulators, TestbedsSimulators, Emulators, TestbedsTOSSIM (Levis)TOSSIM (Levis)– Real-code-simulator for motesReal-code-simulator for motes

Avrora (Titzer, Palsberg)Avrora (Titzer, Palsberg)– Simulates down to microcode levelSimulates down to microcode level

Motelab (Welsh, et al.)Motelab (Welsh, et al.)– Always-on testbed, lowers the massive systems motivation effort Always-on testbed, lowers the massive systems motivation effort

required for deploymentsrequired for deployments

EmStar (Girod, Elson, et al.)EmStar (Girod, Elson, et al.)

Reminders:Reminders:– Sensor outputs are not ground truthsSensor outputs are not ground truths– Matt’s office is not the same as a Redwood forestMatt’s office is not the same as a Redwood forest

Page 11: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Simulators, Emulators, TestbedsSimulators, Emulators, Testbeds

Reality

Scal

e

Pure Simulation

Data Replay

Portable Array

Deployment

Ceiling Array

EmStar’s runtime environments allow high-visibility debuggingbefore jumping into low-visibility deployment

Page 12: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Visibility for DesignVisibility for Design

Even understanding the behavior of a big Even understanding the behavior of a big parallel process is hardparallel process is hard– How do you How do you knowknow what’s going on what’s going on

But even if you do…But even if you do…

Designing local rules to cause global Designing local rules to cause global behavior is hard behavior is hard (Culler, Liu, Welsh)(Culler, Liu, Welsh)

– How do you How do you controlcontrol what’s going on what’s going on

Page 13: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Visibility for ManagementVisibility for Management

The need for visibility doesn’t end when the The need for visibility doesn’t end when the design is done design is done (Madden, Polastre) (Madden, Polastre)

Which sensors have failed?Which sensors have failed?– For repair purposesFor repair purposes– Because it tells you about the dataBecause it tells you about the data

Doesn’t obviate the need for statistical Doesn’t obviate the need for statistical elimination of sensors we think are badelimination of sensors we think are bad– ““Shut up, you’re confusing everyone!”Shut up, you’re confusing everyone!”

Page 14: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Another take: PredictabilityAnother take: Predictability

Instead of observing Instead of observing what happenedwhat happened (post-facto),(post-facto),predict what predict what will happen will happen (static analysis) (static analysis) (Srivastava)(Srivastava)

Page 15: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

““Giving Up”Giving Up”

Tenet (Kohler) – motes can only do the most Tenet (Kohler) – motes can only do the most basic tasks (e.g., thresholding), and route back basic tasks (e.g., thresholding), and route back to a microserverto a microserver– In the low-visibility nodes, complexity is limited to In the low-visibility nodes, complexity is limited to

reasoning about one node’s datareasoning about one node’s data– ““Hard part” happens at microserversHard part” happens at microservers

Mechanism vs. policy separation for routing Mechanism vs. policy separation for routing (Girod)(Girod)– Motes send link states to microserverMotes send link states to microserver– Microserver computes routes; installs them on motesMicroserver computes routes; installs them on motes

Page 16: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Big Challenge 2:Big Challenge 2:Higher Level AbstractionsHigher Level Abstractions

How long can we keep on How long can we keep on doing it this way?doing it this way?

Page 17: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Why are abstractions important?Why are abstractions important?

They let you reason about software at a They let you reason about software at a higher levelhigher level– Right now we manually script every packet Right now we manually script every packet

sent and received, most timers…sent and received, most timers…

They (can) let software interoperate betterThey (can) let software interoperate better– Applications can share the underlying building Applications can share the underlying building

blocks; system is smaller, more consistentblocks; system is smaller, more consistent– Services like TCP port numbersServices like TCP port numbers

Page 18: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Higher Level AbstractionsHigher Level Abstractions

Consider compiler arc:Consider compiler arc:– First, “compiled code is too slow”First, “compiled code is too slow”– Second, “But computers are now fast”Second, “But computers are now fast”– Third, “The compiler does it better anyway”Third, “The compiler does it better anyway”

We’re still at Step 1We’re still at Step 1– Not with CPU cycles (we use compilers)…Not with CPU cycles (we use compilers)…– … … but but bandwidth, energy, and memorybandwidth, energy, and memory. .

Unfortunately there may not be a Step 2Unfortunately there may not be a Step 2

Page 19: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

What if there’s no Step 3?What if there’s no Step 3?The Internet has TCP, which is well-behaved, The Internet has TCP, which is well-behaved, and which many apps useand which many apps use– Nice model: fixed data len, variable timeNice model: fixed data len, variable time

Some (minority?) apps don’t fit this model, adapt Some (minority?) apps don’t fit this model, adapt at the app layer (e.g. video quality)at the app layer (e.g. video quality)Sensor network congestion control (e.g. Woo, Sensor network congestion control (e.g. Woo, Hull): good first steps but still has a focus on Hull): good first steps but still has a focus on collision avoidancecollision avoidanceRoot of the problem: Root of the problem: rate adaptive sensor apps rate adaptive sensor apps must be the common case; they aren’t!must be the common case; they aren’t!Common case is no longer “fixed data size, Common case is no longer “fixed data size, transport it when you can” model – infinite data transport it when you can” model – infinite data like streaming videolike streaming video

Page 20: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Some AbstractionsSome AbstractionsTinyDB (Madden)TinyDB (Madden)– Among the first; programming interface is queriesAmong the first; programming interface is queries

Abstract regions (Welsh)Abstract regions (Welsh)– Program collections at a higher layer than sending Program collections at a higher layer than sending

messagesmessages

Reliable Multi-Hop State Sync (Girod)Reliable Multi-Hop State Sync (Girod)– Publish and update structs over lossy netsPublish and update structs over lossy nets

This week, we’ve seen State-Machines (Kasten) This week, we’ve seen State-Machines (Kasten) and new intermediate languages (Newton)and new intermediate languages (Newton)

But the real question: do they work across a But the real question: do they work across a diversity of applications? Only time will tell.diversity of applications? Only time will tell.

Page 21: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Sub Challenge:Sub Challenge:Re-Usable SoftwareRe-Usable Software

TinyOS, EmStar, etc. are modular, yet TinyOS, EmStar, etc. are modular, yet reuse isn’t as pervasive as it “should be”reuse isn’t as pervasive as it “should be”

One part software engineering, one part One part software engineering, one part Big Problem (as in congestion control)Big Problem (as in congestion control)

An encouraging first step: SP (Sensor An encouraging first step: SP (Sensor Protocol) by Polastre, Culler, et al.Protocol) by Polastre, Culler, et al.– Standardized interface to MAC, with some Standardized interface to MAC, with some

basic feedback in both directionsbasic feedback in both directions

Page 22: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Meta-Challenge: Applications That Meta-Challenge: Applications That Do More Than Web CamerasDo More Than Web Cameras

1999 “Grand Challenges” paper:1999 “Grand Challenges” paper:

“Data processing must be in-network”“Data processing must be in-network”

Where are we now?Where are we now?Many (most?) applications are “bring all the Many (most?) applications are “bring all the data back”data back”– Some notable exceptions including sniper Some notable exceptions including sniper

tracking (vanderbilt), Magneto-Car Tracking tracking (vanderbilt), Magneto-Car Tracking (berkeley), Self-Healing networks (sensoria)(berkeley), Self-Healing networks (sensoria)

Page 23: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Self-Healing NetworksSelf-Healing NetworksSensoria Corp under Sensoria Corp under contract from DARPAcontract from DARPA

Goal: Nodes localize Goal: Nodes localize themselves within 1m, themselves within 1m, MOVE to fill in gapsMOVE to fill in gaps

Network completely Network completely self-organizing, self-organizing, autonomous at many autonomous at many layerslayers

Page 24: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Closing the LoopClosing the Loop20 Nodes; 10 MOBILE. Then, network partitions…

Page 25: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

SummarySummary

Ultimately we want to get to systems that Ultimately we want to get to systems that do amazing thingsdo amazing things

We just keep building on ideas; we have to We just keep building on ideas; we have to build on each others’ systemsbuild on each others’ systems

Abstractions are needed, so we can build Abstractions are needed, so we can build additive systems instead of just additive systems instead of just moremore

None of this will happen without visibilityNone of this will happen without visibility

And above all…And above all…

Page 26: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

What the heck What the heck is theis thekiller killer

application?!!??application?!!??

Page 27: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

AcknowledgementsAcknowledgements

David CullerDavid Culler

Henri Dubois-FerrierHenri Dubois-Ferrier

Lew GirodLew Girod

Richard GuyRichard Guy

Bill KaiserBill Kaiser

Eddie KohlerEddie Kohler

Jie LiuJie Liu

Sam MaddenSam Madden

Andrew ParkerAndrew Parker

Joe PolastreJoe Polastre

Matt WelshMatt Welsh

Alec WooAlec Woo

Yan YuYan Yu

Feng ZhaoFeng Zhao

Page 28: Software Challenges in Wireless Sensor Networks Jeremy Elson Microsoft Research IPSN/SPOTS Tutorial Wednesday, April 27, 2005.

Thank you!Thank you!

Questions? Comments?Questions? Comments?