350 likes | 367 Views
Delve into the Trickle algorithm for robust, responsive, and reliable wireless communication in sensor networks. Explore the dynamics, solutions, and applications of Trickle for network-wide dissemination and consistency. Learn how Trickle outperforms flood-based protocols and ensures scalability and efficiency in ubiquitous sensor networks.
E N D
Wireless Embedded InterNetworkingFoundations of Ubiquitous Sensor Networks- Trickle -Polite Reliable Responsive Dissemination and Consistency David E. Culler University of California, Berkeley WEI short course - L9 trickle
2 2 2 2 1 1 2 Network wide communication- Flood 0 WEI short course - L9 trickle
The Problem • Everybody responds! 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
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 WEI short course - L9 trickle
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
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
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
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, … WEI short course - L9 trickle
2 2 2 2 1 1 2 Trickle – till consisten 0 WEI short course - L9 trickle
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
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 tmin. • If c < k consistent broadcasts are heard by t, broadcast • Otherwise suppress and double t up to tmax. • When there is nothing new to say, stay quiet WEI short course - L9 trickle
Example: K=1 WEI short course - L9 trickle
Work is logarithmic with loss rate WEI short course - L9 trickle
Short-Listen effect – why t/2 • 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
Impact of listen-only period WEI short course - L9 trickle
Numerous Applications • Eliminates the “voodoo constants” in advertisement, route update, and the like. • Extends to dissemination of large object WEI short course - L9 trickle
Request Maintain Transmit 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 … WEI short course - L9 trickle
OTA Programming • Learn about the environment after deployment • sensing range, network characteristics, etc. WEI short course - L9 trickle
OTA Programming • Learn about the environment after deployment • sensing range, network characteristics, etc. WEI short course - L9 trickle
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 WEI short course - L9 trickle
Program 0101010101010101011010101101010101010101 What is Deluge? • A reliable data dissemination protocol for program images over a multihop network. • Combined with a bootloader (TOSBoot) Network Programming WEI short course - L9 trickle
Data Representation • Program divided into pages, each consisting of Npackets. Program 101 110 110 010 010 000 101 111 000 011 Packets 1 2 3 4 N • Reduced RAM requirements • Allows for spatial multiplexing WEI short course - L9 trickle
How Does Deluge Work?(Glossing over many details) • Nodes periodically advertise • Suppress similar advertisements I only have version 1. Version 2here. I only have version 1. WEI short course - L9 trickle
How Does Deluge Work?(Glossing over many details) • Neighboring nodes request data • Suppress similar requests Send mepage 1! Send me page 1! WEI short course - L9 trickle
How Does Deluge Work?(Glossing over many details) • Requested data is broadcast Packet 12 of page 1! WEI short course - L9 trickle
How Does Deluge Work?(Glossing over many details) • Dropped packets are NACKed Repeat packet 4of page 1! Repeat packet 32of page 1! WEI short course - L9 trickle
How Does Deluge Work?(Glossing over many details) • Dropped packets are sent again Packet 4 of page 1! WEI short course - L9 trickle
How Does Deluge Work?(Glossing over many details) • Advertise for propagation to next hop Version 2here. I only have version 1. WEI short course - L9 trickle
Spatial Multiplexing • Propagate in “waves” • Exploit limited radio range for concurrent broadcasts. • Reduced completion time • o(d + Sobj) vs. o(d *Sobj) Page 1 Page 0 WEI short course - L9 trickle
Epidemic Propagation • Epidemic propagation from one source WEI short course - L9 trickle
Epidemic Propagation • Epidemic propagation from one source or many WEI short course - L9 trickle
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 WEI short course - L9 trickle
Program Name Compile Time UserID Hostname Platform ProgA ProgB ProgC 0101010101010101011010101101010101010101 0101010101010101011010101101010101010101 0101010101010101011010101101010101010101 CRC CRC CRC CRC CRC CRC CRC CRC CRC 0101010101010101011010101101010101010101 CRC CRC CRC CRASH! 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
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 WEI short course - L9 trickle
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 WEI short course - L9 trickle