Trickle: Code Propagation and Maintenance in Wireless Sensor - - PowerPoint PPT Presentation

trickle code propagation and maintenance in wireless
SMART_READER_LITE
LIVE PREVIEW

Trickle: Code Propagation and Maintenance in Wireless Sensor - - PowerPoint PPT Presentation

Trickle: Code Propagation and Maintenance in Wireless Sensor Networks Philip Levis Scott Shenker Neil Patel David Culler UC Berkeley UC Berkeley UC Berkeley UC Berkeley Intel Berkeley ICIR Intel Berkeley Embedded Sensor Networks 36m


slide-1
SLIDE 1

Trickle: Code Propagation and Maintenance in Wireless Sensor Networks

Philip Levis

UC Berkeley Intel Berkeley

Scott Shenker

UC Berkeley ICIR

Neil Patel

UC Berkeley

David Culler

UC Berkeley Intel Berkeley

slide-2
SLIDE 2

Embedded Sensor Networks

36m 33m: 111 32m: 110 30m: 109,108,107 20m: 106,105,104 10m: 103, 102, 101

slide-3
SLIDE 3

Sensor Network Behavior

slide-4
SLIDE 4

Problem Statement

  • Sensor network characteristics

– Long lifetimes – Embedded and unreachable – Large numbers – Transient, lossy networks

  • Changes to running code are inevitable
  • Need to efficiently

– Rapidly propagate new code into a network – Cheaply maintain a consistent code image

slide-5
SLIDE 5

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

slide-6
SLIDE 6

Outline

  • Problem statement
  • Trickle algorithm
  • Maintenance
  • Propagation
  • Future Work
slide-7
SLIDE 7

Trickle Assumptions

  • Broadcast medium
  • Concise, comparable metadata
  • Metadata is the significant cost

– 1 packet/minute for a day is 1440 messages – Equivalent to a 40K code image – Code will often be small: parameters, etc.

slide-8
SLIDE 8

Communication

  • As long as each mote communicates with
  • ne other, inconsistencies will be found
  • Transmission or reception
  • Maintain a lower communication bound over

time:

  • The closer to k, the better (efficiency)

(receptions + transmissions) <= k

slide-9
SLIDE 9

Trickle Algorithm

  • Time interval of length t
  • Redundancy constant k (e.g., 1, 2)
  • Pick a time t from [0, t]
  • Maintain a counter c
  • At time t, transmit code metadata if c < k
  • Increment c when you hear identical

metadata to your own

  • At end of t, pick a new t
slide-10
SLIDE 10

Example Trickle Execution, k = 1

t1 t2

time

t1 t2

t

t1 t2

B C

transmission suppressed transmission reception

A

slide-11
SLIDE 11

Outline

  • Problem statement
  • Trickle algorithm
  • Maintenance
  • Propagation
  • Future Work
slide-12
SLIDE 12

Maintenance Evaluation

  • Start with three assumptions, relax each

– Lossless cell – Perfect synchronization – Single cell

  • Single, lossless, synchronized cell

– k transmissions per interval – First k nodes to transmit suppress all others – Independent of density

  • In experiments (unless said otherwise), k =1
slide-13
SLIDE 13

Loss

2 4 6 8 10 12 1 2 4 8 16 32 64 128 256

Motes Transmissions/Interval 60% 40% 20% 0%

slide-14
SLIDE 14

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

slide-15
SLIDE 15

Synchronization

2 4 6 8 10 12 14 1 2 4 8 16 32 63 128 256

Motes Transmissions/Interval

Not Synchronized Synchronized

slide-16
SLIDE 16

Short Listen Effect

  • Lack of synchronization leads to the “short

listen effect”

  • For example, B transmits three times:

A B C D Time

t

slide-17
SLIDE 17

Solution

  • Add a listening period: t from [0.5t, t]

Listen-only period

slide-18
SLIDE 18

Effect of Listen Period

2 4 6 8 10 12 14 1 2 4 8 16 32 63 128 256

Motes Transmissions/Interval

Not Synchronized Synchronized Listening

slide-19
SLIDE 19

Multi-Cell Case

  • TOSSIM simulation

– No synchronization – Loss sampled from empirical models – Nodes uniformly distributed in 50’x50’ area

  • Logarithmic scaling holds

2 4 6 8 10 12 14 16 1 2 4 8 16 32 64 128 256

Motes Transmissions/Interval

Hidden Terminal No Hidden Terminal

slide-20
SLIDE 20

Empirical Validation

Efficiency over Density

0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1 2 4 8 16 32 64

Motes Efficiency

Empirical Simulated

  • Redundancy: (transmissions + receptions)

intervals

  • k
slide-21
SLIDE 21

Outline

  • Problem statement
  • Trickle algorithm
  • Maintenance
  • Propagation
  • Future Work
slide-22
SLIDE 22

Speeding Propagation

  • Adjust t: tl, th
  • When t expires, double t up to th
  • When you hear newer metadata, set t to tl
  • When you hear newer code, set t to tl
  • When you hear older metadata, send code

– Blind transmission at 1, 3, and 7 seconds – Could use Trickle for suppression as well

slide-23
SLIDE 23

Rate Change Illustration

th tl 2tl th th

Hear Newer Metadata 2 Time

slide-24
SLIDE 24

Empirical Propagation

  • Deployed 19 nodes in office setting
  • Instrumented nodes for accurate time

measurements

  • Introduce new code, log installation times
  • k=1, tl=1 second, th=1 minute
  • 40 test runs
slide-25
SLIDE 25

Network Layout

slide-26
SLIDE 26

Empirical Results

Propagation Time Distribution

0.00% 5.00% 10.00% 15.00% 20.00% 25.00% 30.00% 35.00% 5 10 15 20 25 30 35 40 45 Time (seconds) Motes

Time to Complete Propagation

10 20 30 40 50 60 70 Time (seconds)

slide-27
SLIDE 27

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 tl, th and k needed
slide-28
SLIDE 28

Questions

slide-29
SLIDE 29

Multi-cell Case, Simulated

2 4 6 8 10 12 14 16 1 2 4 8 16 32 64 128 256

Motes Transmissions/Interval

Hidden Terminal No Hidden Terminal

slide-30
SLIDE 30

Empirical Scaling

  • Nodes evenly spaced on a table
  • Very low signal strength for packet loss
slide-31
SLIDE 31

Simulated Propagation

  • TOSSIM, 20x20 node grid
  • Change spacing between nodes
  • k=1, tl=1 second, th=1 minute
slide-32
SLIDE 32

Time To Reprogram, Tau, 5 Foot Spacing (seconds)

16-18 14-16 12-14 10-12 8-10 6-8 4-6 2-4 0-2

slide-33
SLIDE 33

Time

Time To Reprogram, Tau, 10 Foot Spacing (seconds)

18-20 16-18 14-16 12-14 10-12 8-10 6-8 4-6 2-4 0-2

slide-34
SLIDE 34

Time

Time To Reprogram, Tau, 15 Foot Spacing (seconds)

45-50 40-45 35-40 30-35 25-30 20-25 15-20 10-15 5-10 0-5

slide-35
SLIDE 35

Time

Time To Reprogram, Tau, 20 Foot Spacing (seconds)

56-64 48-56 40-48 32-40 24-32 16-24 8-16 0-8

slide-36
SLIDE 36

Changing th to 20 minutes

10 20 30 40 50 60 70

Time (seconds)

10 20 30 40 50 60 70

Time (seconds)

k=1 k=2