June 2008 WEI short course - L9 trickle 1 Wireless Embedded InterNet working Foundations of Ubiquitous Sensor Networks - Trickle - Polite Reliable Responsive Dissemination and Consistency David E. Culler University of California, Berkeley
June 2008WEI short course - L9 trickle2 Network wide communication- Flood
June 2008WEI short course - L9 trickle3 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'99The broadcast storm problem in a mobile ad hoc network Everybody responds!
June 2008WEI short course - L9 trickle4 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 Complex Behavior at Scale: An Experimental Study of Low-Power Wireless Sensor Networks
June 2008WEI short course - L9 trickle5 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 2008WEI short course - L9 trickle6 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 2008WEI short course - L9 trickle7 Selective Retransmission Schemes Probabilistic Retransmission –Fixed prob. –What would be the right choice? Counter –When hear msg, start random delay –If hear C msgs during wait, don’t retransmit Distance –If nearest node from which msg is heard is less than some threshold, don’t retransmit Location –If portion of cell not covered by transmitting neighbors is less than some threshold, don’t retransmit Cluster-based –Partition graph into cluster heads, gateways, and members –Members don’t transmit
June 2008WEI short course - L9 trickle8 Adaptive BCAST rate Upon first msg –Start random delay –If new msg arrives during delay »Filter message (eg., discard if signal strength below threshold) »If passes filter, Utilize message »Start new delay Upon expiration of delay –Complete local processing »E.g., pick lowest depth node with strongest signal as parent –Retransmit Delay is proportion to cell density –Wait till ngbrs go quiet before transmit –=> Approx uniform transmissions per unit area, regardless of node density Exploit long links when appropriate
June 2008WEI short course - L9 trickle9 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 2008WEI short course - L9 trickle10 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 2008WEI short course - L9 trickle11 Trickle – till consisten
June 2008WEI short course - L9 trickle12 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 2008WEI short course - L9 trickle13 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 to min. If c < k consistent broadcasts are heard by t, broadcast Otherwise suppress and double up to max. When there is nothing new to say, stay quiet
June 2008WEI short course - L9 trickle14 Example: K=1
June 2008WEI short course - L9 trickle15 Work is logarithmic with loss rate
June 2008WEI short course - L9 trickle16 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 2008WEI short course - L9 trickle17 Impact of listen-only period
June 2008WEI short course - L9 trickle18 Numerous Applications Eliminates the “voodoo constants” in advertisement, route update, and the like. Extends to dissemination of large object
June 2008WEI short course - L9 trickle19 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 2008WEI short course - L9 trickle20 OTA Programming Learn about the environment after deployment –sensing range, network characteristics, etc.
June 2008WEI short course - L9 trickle21 OTA Programming Learn about the environment after deployment –sensing range, network characteristics, etc.
June 2008WEI short course - L9 trickle22 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 2008WEI short course - L9 trickle23 What is Deluge? A reliable data dissemination protocol for program images over a multihop network. Combined with a bootloader (TOSBoot) Network Programming Program
June 2008WEI short course - L9 trickle24 Data Representation Program divided into pages, each consisting of N packets Program Packets 1234N Reduced RAM requirements Allows for spatial multiplexing
June 2008WEI short course - L9 trickle25 How Does Deluge Work? (Glossing over many details) Nodes periodically advertise –Suppress similar advertisements Version 2 here. I only have version 1.
June 2008WEI short course - L9 trickle26 How Does Deluge Work? (Glossing over many details) Neighboring nodes request data –Suppress similar requests Send me page 1!
June 2008WEI short course - L9 trickle27 How Does Deluge Work? (Glossing over many details) Requested data is broadcast Packet 12 of page 1!
June 2008WEI short course - L9 trickle28 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 2008WEI short course - L9 trickle29 How Does Deluge Work? (Glossing over many details) Dropped packets are sent again Packet 4 of page 1!
June 2008WEI short course - L9 trickle30 How Does Deluge Work? (Glossing over many details) Advertise for propagation to next hop Version 2 here. I only have version 1.
June 2008WEI short course - L9 trickle31 Spatial Multiplexing Propagate in “waves” Exploit limited radio range for concurrent broadcasts. Reduced completion time o(d + S obj ) vs. o(d * S obj ) Page 0Page 1
June 2008WEI short course - L9 trickle32 Epidemic Propagation Epidemic propagation from one source
June 2008WEI short course - L9 trickle33 Epidemic Propagation Epidemic propagation from one source or many
June 2008WEI short course - L9 trickle34 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 2008WEI short course - L9 trickle35 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 ProgAProgBProgC Program Name Compile Time UserID Hostname Platform CRASH! CRC
June 2008WEI short course - L9 trickle36 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 more efficient that ! Disadvantages –Ease of reprogramming 100’s-1000’s of nodes
June 2008WEI short course - L9 trickle37 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