Presentation is loading. Please wait.

Presentation is loading. Please wait.

Trickle: Code Propagation and Maintenance Neil Patel UC Berkeley David Culler UC Berkeley Scott Shenker UC Berkeley ICSI Philip Levis UC Berkeley.

Similar presentations


Presentation on theme: "Trickle: Code Propagation and Maintenance Neil Patel UC Berkeley David Culler UC Berkeley Scott Shenker UC Berkeley ICSI Philip Levis UC Berkeley."— Presentation transcript:

1 Trickle: Code Propagation and Maintenance Neil Patel UC Berkeley David Culler UC Berkeley Scott Shenker UC Berkeley ICSI Philip Levis UC Berkeley

2 NEST Retreat, Jan 20042 Retasking a Sensor Net Long lifetimes require retasking Spectrum of retasking mechanisms –Binary images (MOAP, XnP, Deluge) –High-level virtual programs (Maté, TinyDB) –Parameter setting (Attribute, Global) Install on every node –Packet loss and transient disconnection –Periodically check that everyone has the right code (advertise) –TinyDB tuples embed query ID

3 NEST Retreat, Jan 20043 Propagating Can Be Costly, Binaries: 10-60KB Virtual programs: 20-400B Parameters: 8-30B To every node in a large, multihop network…

4 NEST Retreat, Jan 20044 Knowing When Is Costlier Periodically checking that everyone has the right code (advertisements) can cost more than the code itself. 64KB of data: ~1 packet/minute for a day 400B of data: ~1 packet/hour for a day 20B: one packet!

5 NEST Retreat, Jan 20045 Problem Statement The first step is to detect when nodes need updates (continuous process) When there is no new code –Maintenance cost should approach zero When there is new code –Propagation should be rapid

6 NEST Retreat, Jan 20046 Relation to Deluge, SPIN, etc. When do you advertise code? How do you suppress control messages? Not a dissemination protocol

7 NEST Retreat, Jan 20047 Solution: Trickle Simple, “polite gossip” algorithm “Every once in a while, broadcast what code you have, unless you’ve heard some other nodes broadcast the same thing.” Behavior (simulation and deployment): –Scalability: thousand-fold density changes –Maintenance: a few sends per hour –Propagation: less than a minute

8 NEST Retreat, Jan 20048 Outline Introduction Trickle algorithm Maintenance Propagation Conclusion

9 NEST Retreat, Jan 20049 Trickle Assumptions Wireless broadcast medium Concise, comparable metadata –Given A and B, know which has newer code

10 NEST Retreat, Jan 200410 Idea: Communication As long as each mote communicates with one other, needed updates will be detected –In a single cell, one transmission will detect all needed updates Communication is reception or transmission Maintain a communication rate: (receptions + transmissions) <= k

11 NEST Retreat, Jan 200411 Trickle Algorithm Time interval of length  Redundancy constant k (e.g., 1, 2) Pick a time t from [0,  ] Maintain a counter c, initialized to zero At time t, broadcast code metadata if c < k Increment c when you hear identical metadata to your own At end of , pick a new t

12 NEST Retreat, Jan 200412 Example Trickle Execution time  2 3 transmissionsuppressed transmissionreception 1 k=1 c 0 0 0

13 NEST Retreat, Jan 200413 Example Trickle Execution t 1a time  2 3 transmissionsuppressed transmissionreception 1 k=1 c 0 0 0

14 NEST Retreat, Jan 200414 Example Trickle Execution t 1a time  2 3 transmissionsuppressed transmissionreception 1 k=1 c 0 1 0

15 NEST Retreat, Jan 200415 Example Trickle Execution t 1a time  t 3a 2 3 transmissionsuppressed transmissionreception 1 k=1 c 0 1 0

16 NEST Retreat, Jan 200416 Example Trickle Execution t 1a time  t 3a 2 3 transmissionsuppressed transmissionreception 1 k=1 c 0 2 0

17 NEST Retreat, Jan 200417 Example Trickle Execution t 1a time t 2a  t 3a 2 3 transmissionsuppressed transmissionreception 1 k=1 c 0 2 0

18 NEST Retreat, Jan 200418 Example Trickle Execution t 1a time t 2a  t 3a 2 3 transmissionsuppressed transmissionreception 1 k=1 c 0 0 0

19 NEST Retreat, Jan 200419 Example Trickle Execution t 1a time t 2a t 2b  t 3a 2 3 transmissionsuppressed transmissionreception 1 k=1 c 1 0 1

20 NEST Retreat, Jan 200420 Example Trickle Execution t 1a time t 2a t 2b  t 3a t 3b 2 3 transmissionsuppressed transmissionreception 1 k=1 c 1 0 1

21 NEST Retreat, Jan 200421 Example Trickle Execution t 1a t 1b time t 2a t 2b  t 3a t 3b 2 3 transmissionsuppressed transmissionreception 1 k=1 c 1 0 1

22 NEST Retreat, Jan 200422 Outline Problem statement Trickle algorithm Maintenance Propagation Conclusion

23 NEST Retreat, Jan 200423 Maintenance Minimize maintenance cost (transmissions) when there is no new code –Keep as close to k as possible Start with three assumptions, relax each –Lossless network –Perfect synchronization –Single-hop

24 NEST Retreat, Jan 200424 Ideal Case k transmissions per interval First k nodes to transmit suppress all others Independent of density

25 NEST Retreat, Jan 200425 Loss

26 NEST Retreat, Jan 200426 Logarithmic Behavior of Loss Transmission increase is due to the probability that one node has not heard n transmissions Example: 10% loss –1 in 10 nodes will not hear one transmission –1 in 100 nodes will not hear two transmissions –1 in 1000 nodes will not hear three, etc. Fundamental bound to maintaining per- interval communication

27 NEST Retreat, Jan 200427 Synchronization

28 NEST Retreat, Jan 200428 Short Listen Effect Some nodes don’t listen much (pick small t values) For example, B transmits three times: A B C D Time  transmissionsuppressed transmissionreception

29 NEST Retreat, Jan 200429 Solution Add a listening period: pick t from [0.5 ,  ] Listen-only period

30 NEST Retreat, Jan 200430 Effect of Listen Period

31 NEST Retreat, Jan 200431 Multi-Cell Case TOSSIM simulation –No synchronization, loss from empirical model –Nodes uniformly distributed in 50’x50’ area Logarithmic scaling holds

32 NEST Retreat, Jan 200432 Empirical Validation Redundancy: Maté VM implementation (transmissions + receptions) intervals - k

33 NEST Retreat, Jan 200433 Outline Problem statement Trickle algorithm Maintenance Propagation Conclusion

34 NEST Retreat, Jan 200434 Choosing Intervals Large interval: low cost, slow to discover Small interval: high cost, quick to discover When there’s new gossip, talk more When there’s nothing new, talk less

35 NEST Retreat, Jan 200435 Speeding Propagation Adjust  :  l,  h When  expires, double  up to  h When you hear newer metadata, set  to  l When you hear newer code, set  to  l When you hear older metadata, send an update

36 NEST Retreat, Jan 200436 Rate Change Illustration hh ll 2l2l hh hh Hear Newer Metadata 2 Time

37 NEST Retreat, Jan 200437 Simulated Propagation k=1,  l =1 second,  h =1 minute

38 NEST Retreat, Jan 200438 Empirical Propagation Deployed 19 nodes in office setting Instrumented nodes for accurate time measurements Introduce new code, log installation times k=1,  l =1 second,  h =1 minute 40 test runs

39 NEST Retreat, Jan 200439 Network Layout

40 NEST Retreat, Jan 200440 Empirical Results

41 NEST Retreat, Jan 200441 Changing  h to 20 minutes k=1

42 NEST Retreat, Jan 200442 Conclusions Trickle efficiency scales logarithmically with density Can obtain rapid propagation with low maintenance –At most 3 sends/hour, propagates in 30 seconds Uses beyond code propagation –Changes to data such as routing tables –E.g., predicates can scope distance Further examination of  l,  h and k needed

43 NEST Retreat, Jan 200443 Questions Tech report available in back

44 NEST Retreat, Jan 200444 Sensor Network Behavior

45 NEST Retreat, Jan 200445 Multi-cell Case, Simulated

46 NEST Retreat, Jan 200446

47 NEST Retreat, Jan 200447

48 NEST Retreat, Jan 200448


Download ppt "Trickle: Code Propagation and Maintenance Neil Patel UC Berkeley David Culler UC Berkeley Scott Shenker UC Berkeley ICSI Philip Levis UC Berkeley."

Similar presentations


Ads by Google