June 2008 WEI short course - L9 trickle 1 Wireless Embedded InterNet working Foundations of...
-
date post
20-Dec-2015 -
Category
Documents
-
view
213 -
download
0
Transcript of June 2008 WEI short course - L9 trickle 1 Wireless Embedded InterNet working Foundations of...
June 2008 WEI short course - L9 trickle 1
Wireless Embedded InterNetworking
Foundations of Ubiquitous Sensor Networks
- Trickle -Polite Reliable Responsive Dissemination and
Consistency
David E. CullerUniversity of California, Berkeley
June 2008 WEI short course - L9 trickle 3
The Problem
Ni, S.Y., Tseng, Y.C., Chen, Y.S., Sheu, J.P.: The broadcast storm problem in a mobile ad hoc network. MobiCom'99
• Everybody responds!
June 2008 WEI short course - L9 trickle 4
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 5
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
June 2008 WEI short course - L9 trickle 6
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
June 2008 WEI short course - L9 trickle 9
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.
June 2008 WEI short course - L9 trickle 10
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 12
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
June 2008 WEI short course - L9 trickle 13
Algorithm
• Define a desired detection latency, • Choose a redundancy constant k
– k = (receptions + transmissions)
– In an interval of length
• Trickle keeps the rate as close to k/ as possible
• Choose timer t random in (• If inconsistent broadcast is heard before t, reset tomin.
• If c < k consistent broadcasts are heard by t, broadcast
• Otherwise suppress and double up tomax.
• When there is nothing new to say, stay quiet
June 2008 WEI short course - L9 trickle 16
Short-Listen effect – why /2
• With unsynchronized intervals and no min, some nodes get small t and broadcast even though they are hearing enough to suppress
June 2008 WEI short course - L9 trickle 18
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 19
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
Transmit
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 range, network characteristics, etc.
June 2008 WEI short course - L9 trickle 22
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 23
What is Deluge?
•A reliable data dissemination protocol for program images over a multihop network.
•Combined with a bootloader (TOSBoot) Network Programming
0101010101010101011010101101010101010101
Program
June 2008 WEI short course - L9 trickle 24
Data Representation
•Program divided into pages, each consisting of N packets.
101110
110010
010000
101111
000011
Program
Packets
1234 N
•Reduced RAM requirements
•Allows for spatial multiplexing
June 2008 WEI short course - L9 trickle 25
How Does Deluge Work?(Glossing over many details)
•Nodes periodically advertise– Suppress similar advertisements
Version 2 here.
I only have version 1.
I only have version 1.
June 2008 WEI short course - L9 trickle 26
How Does Deluge Work?(Glossing over many details)
•Neighboring nodes request data– Suppress similar requests
Send me page 1!
Send me page 1!
June 2008 WEI short course - L9 trickle 27
How Does Deluge Work?(Glossing over many details)
•Requested data is broadcast
Packet 12of page 1!
June 2008 WEI short course - L9 trickle 28
How Does Deluge Work?(Glossing over many details)
•Dropped packets are NACKed
Repeat packet 4 of page 1!
Repeat packet 32 of page 1!
June 2008 WEI short course - L9 trickle 29
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 30
How Does Deluge Work?(Glossing over many details)
•Advertise for propagation to next hop
Version 2 here.
I only have version 1.
June 2008 WEI short course - L9 trickle 31
Spatial Multiplexing
•Propagate in “waves”
•Exploit limited radio range for concurrent broadcasts.
•Reduced completion time
•o(d + Sobj) vs. o(d * Sobj)
Page 0Page 1
June 2008 WEI short course - L9 trickle 32
Epidemic Propagation
•Epidemic propagation from one source
June 2008 WEI short course - L9 trickle 33
Epidemic Propagation
•Epidemic propagation from one source or many
June 2008 WEI short course - L9 trickle 34
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 35
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
0101010101010101011010101101010101010101
0101010101010101011010101101010101010101
0101010101010101011010101101010101010101
ProgA ProgB ProgC
Program NameCompile TimeUserIDHostnamePlatform
CRASH!
CR
CC
RC
CR
CC
RC
CR
CC
RC
CR
CC
RC
CR
CC
RC
CR
CC
RC01010
10101010101011010101101010101010101
June 2008 WEI short course - L9 trickle 36
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