Wireless Embedded InterNetworking Foundations of Ubiquitous Sensor Networks - Trickle Polite Reliable Responsive Dissemination and Consistency David E.

Download Report

Transcript Wireless Embedded InterNetworking Foundations of Ubiquitous Sensor Networks - Trickle Polite Reliable Responsive Dissemination and Consistency David E.

June 2008

Wireless Embedded InterNet working

Foundations of Ubiquitous Sensor Networks

- Trickle Polite Reliable Responsive Dissemination and Consistency

David E. Culler

University of California, Berkeley

WEI short course - L9 trickle 1

Network wide communication- Flood

June 2008 2 2 2 1 0 WEI short course - L9 trickle 1 2 2 2

The Problem

Everybody responds!

June 2008

Ni, S.Y., Tseng, Y.C., Chen, Y.S., Sheu, J.P.:

The broadcast storm problem in a mobile ad hoc network

. MobiCom'99

WEI short course - L9 trickle 3

Flood Dynamics

• • •

Experimental Setup

13x13 grid of nodes

– – –

separation 2ft flat open surface Identical length antennas, pointing vertically upwards.

– –

Fresh batteries on all nodes Identical orientation of all nodes

The region was clean of external noise sources.

Range of signal strength settings Log many runs

Ganesan, Krishnamachari, Woo, Culler, Estrin and Wicker,

Complex Behavior at Scale: An Experimental Study of

Low-Power Wireless Sensor Networks , UCLA Computer Science Technical Report UCLA/CSD-TR 02-0013

June 2008 WEI short course - L9 trickle 4

June 2008

Recast the problem

• • • • • •

The goal is NOT to flood The goal is to bring the network to a new consistent state

– – –

all nodes have the same piece of information All nodes receive the same command All nodes form a spanning tree

»

DHCP delegation

»

Multihop Router Advertisements Respond rapidly to a change Quiesce to very low communication rate Never stomp on each other High scalability

Extent AND density WEI short course - L9 trickle 5

June 2008

A first step

• • • • •

Grow the tree slowly Avoid Contention at every transmission Avoid Redundant Transmissions Adapt to huge range of density Make sure it eventually gets to everyone

– –

Even if they are not listening Or arrive late

With very simple mechanism WEI short course - L9 trickle 6

June 2008

Trickle – better than flood

• • • • • •

Want the communication rate per unit area to be constant, regardless of the density of nodes

– –

Lots of nodes, transmit infrequently Few node, transmit more frequently Nodes listen before transmitting Estimate density based on how many nodes you hear from

Arrival during timer wait extends timer If new value is disseminated by others, no need for you to transmit it.

Increase delay over time so ambient rate approaches zero.

Shorten delay when new epoch appears.

WEI short course - L9 trickle 9

Epidemic NW protocols

• Goal: scalable, robust communication algorithms that adapt to changing conditions with little state or protocol • Basic operation: –

From time to time (based on local state and what you’ve heard) transmit a packet of information to whomever hears the message

– –

From time to time, hear a packet which causes an update to local state Continuous process to ensure full reliability

• Adapt to density, coverage, interference, loss, schedule, …

June 2008 WEI short course - L9 trickle 10

Trickle – till consisten

June 2008 2 2 2 1 0 WEI short course - L9 trickle 1 2 2 11

June 2008

Solution: Trickle

• “Every once in a while, broadcast what data you have, unless you’ve heard some other nodes broadcast the same thing recently.” • Behavior (simulation and deployment): – Maintenance: a few sends per hour – Propagation: less than a minute – Scalability: thousand-fold density changes • Instead of flooding a network, establish a trickle of packets, just enough to stay up to date.

• As long as each node communicates with others, inconsistencies will be found • Either reception or transmission is sufficient

WEI short course - L9 trickle 12

Algorithm

• Define a desired detection latency, t • Choose a redundancy constant k – k = (receptions + transmissions) – In an interval of length t • Trickle keeps the rate as close to k/ t as possible • Choose timer t random in ( t/2, t] • If inconsistent broadcast is heard before t, reset t to t min.

• If c < k consistent broadcasts are heard by t, broadcast • Otherwise suppress and double t up to t max.

• When there is nothing new to say, stay quiet

WEI short course - L9 trickle June 2008 13

Example: K=1

June 2008 WEI short course - L9 trickle 14

Work is logarithmic with loss rate

June 2008 WEI short course - L9 trickle 15

Short-Listen effect – why

t

/2

June 2008

With unsynchronized intervals and no min, some nodes get small t and broadcast even though they are hearing enough to suppress WEI short course - L9 trickle 16

Impact of listen-only period

June 2008 WEI short course - L9 trickle 17

Numerous Applications

• •

Eliminates the “voodoo constants” in advertisement, route update, and the like.

Extends to dissemination of large object June 2008 WEI short course - L9 trickle 18

Robust OTA Programming

• • • • •

Every byte must (eventually) be correctly received by all nodes!

Reliable Pipelined Epidemic Distribution of series of pages

Constrained storage hierarchy

»

Packet (32 bytes) << RAM (4K) << program (128K) < external flash (512K)

Lossy links, Critical Contention

Density-aware

– – – –

Robust to asymmetric links Dynamic adjustment of advertisements Minimize set of concurrent data broadcasts Spatial multiplexing Page Advertise, Request/Fix, Xfer

Density-aware suppression and snoop on each Packet CRC + Page CRC 159 Byte memory footprint flash …

Maintain Request

WEI short course - L9 trickle June 2008

OTA Programming

•Learn about the environment after deployment –

sensing range, network characteristics, etc.

June 2008 WEI short course - L9 trickle 20

OTA Programming

•Learn about the environment after deployment –

sensing range, network characteristics, etc.

June 2008 WEI short course - L9 trickle 21

OTA Programming

• Learn about the environment after deployment –

sensing data, network characteristics, etc.

• Embedded nature of sensor networks • Network scales reaching thousands of nodes • A necessity in debugging and testing cycle

June 2008 WEI short course - L9 trickle 22

What is Deluge?

•A reliable data dissemination protocol for program images over a multihop network.

Program 01010 10101 01010 10110 10101 10101 01010 10101

•Combined with a bootloader (TOSBoot) 

Network Programming

June 2008 WEI short course - L9 trickle 23

Data Representation

•Program divided into

pages

, each consisting of

N

packets

.

Program

101 110 110 010 010 000

Packets 1234

101 111 000 011

N •Reduced RAM requirements •Allows for spatial multiplexing

June 2008 WEI short course - L9 trickle 24

June 2008

How Does Deluge Work?

(Glossing over many details)

•Nodes periodically advertise –

Suppress similar advertisements

I only have

version 1

.

Version 2

here.

I only have

version 1

.

WEI short course - L9 trickle 25

June 2008

How Does Deluge Work?

(Glossing over many details)

•Neighboring nodes request data

Suppress similar requests

Send me

page 1 !

Send me

page 1

!

WEI short course - L9 trickle 26

How Does Deluge Work?

(Glossing over many details)

•Requested data is broadcast

Packet 12

of

page 1

!

June 2008 WEI short course - L9 trickle 27

How Does Deluge Work?

(Glossing over many details)

•Dropped packets are NACKed

Repeat

packet 4

of

page 1

!

June 2008

Repeat

packet 32

of

page 1

!

WEI short course - L9 trickle 28

How Does Deluge Work?

(Glossing over many details)

•Dropped packets are sent again

Packet 4

of

page 1

!

June 2008 WEI short course - L9 trickle 29

June 2008

How Does Deluge Work?

(Glossing over many details)

•Advertise for propagation to next hop

Version 2

here.

I only have

version 1

.

WEI short course - L9 trickle 30

Spatial Multiplexing

•Propagate in “

waves

” •Exploit limited radio range for concurrent broadcasts.

•Reduced completion time •

o

(

d

+

S obj

) vs.

o

(

d

*

S obj

)

June 2008 WEI short course - L9 trickle Page 1 Page 0 31

Epidemic Propagation

•Epidemic propagation from one source

June 2008 WEI short course - L9 trickle 32

Epidemic Propagation

•Epidemic propagation from one source

or many

June 2008 WEI short course - L9 trickle 33

Deluge Features

•Epidemic propagation from one source or many –

Continuous propagation effort by all nodes

Turn on/off radios at will

Reach nodes with intermittent connectivity

Will find a path if it exists

•Aggressive message suppression –

Scales with density

Ultra low quiescent traffic June 2008 WEI short course - L9 trickle 34

Deluge Features

Management

Multiple program images

– –

Image metadata User confirmation on expensive operations

»

Minimize operator error

Robustness

Redundant CRCs

Golden Image with write protect

Load Golden Image

»

Watchdog trigger

»

Golden gesture

TOSBoot

– – –

TOSBoot as isolated code Verify CRCs Verify system voltage WEI short course - L9 trickle June 2008 Program Name Compile Time UserID Hostname Platform ProgA 01010 10101 01010 10110 10101 10101 01010 10101 ProgB 01010 10101 01010 10110 10101 10101 01010 10101 ProgC 01010 10101 01010 10110 10101 10101 01010 10101 CRASH!

35

Deluge - Lessons Learned

•Advantages –

Ease of reprogramming 100’s-1000’s of nodes

Does not erase node IDs

– –

Golden Image is immensely useful Quickly switch between images

– –

More reliable than uisp or msp430-bsl

Deluge over 802.15.4 more efficient that 802.11!

•Disadvantages –

Ease of reprogramming 100’s-1000’s of nodes June 2008 WEI short course - L9 trickle 36

Take-aways

• • •

Many embedded network applications will be built as “application overlays” on UDP Use trickle as a “polite gossip” adaptive congestion control.

Additional optimizations through scheduling June 2008 WEI short course - L9 trickle 37