wireless sensor network reprogramming: data dissemination

45
1 Wireless Sensor Network Reprogramming: Data Dissemination Protocols at Scale Bin Wang Department of Computer Science & Engineering Wright State University

Upload: others

Post on 10-Feb-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Wireless Sensor Network Reprogramming: Data Dissemination

1

Wireless Sensor Network Reprogramming: Data Dissemination Protocols at Scale

Bin WangDepartment of Computer Science & Engineering

Wright State University

Page 2: Wireless Sensor Network Reprogramming: Data Dissemination

2

Motivation

g Wireless sensor networks with large numbers of resource-constrained computing nodes cooperating on a single application

g WSNs often operate for extended periods of time unattended

g Evolving analysis and environments can change application requirementsiCreating the need to alter the network’s behavior by

introducing new code

Page 3: Wireless Sensor Network Reprogramming: Data Dissemination

3

Network Programming is Essential

g Retasking is essentialiOften learn about the environment after deployment

(sensing data, network characteristics, etc.)

g Retasking over the network iEmbedded nature of sensor networks requires the

propagation of new code over the networkiNetwork scales reaching thousands of nodesiA necessity in debugging and testing cycle

Page 4: Wireless Sensor Network Reprogramming: Data Dissemination

4

Reprogramming

g Program sensor motes via a wired connection to PCg Improved approachiSingle hop over-the-air reprogramming schemeiA super mote relays the code segment to all motes that are

listeningiFeasible in a large sensor field only if the broadcasting mote

has a powerful enough transmitter to reach every mote in the fieldiRequests for lost segments result in

• Message implosion – crash the super moteiSingle point of failureiConstrain the size of sensor field to the broadcast range of

the super mote

Page 5: Wireless Sensor Network Reprogramming: Data Dissemination

5

Methods for Retasking

g Core service to enable network programming is the dissemination of a program image over a multi-hop WSN

Page 6: Wireless Sensor Network Reprogramming: Data Dissemination

6

Goal and Issues

g GoaliReliably disseminate large objects (i.e., size >> RAM) over a

multi-hop sensor network from few to many nodes

g IssuesiConstrained storage hierarchy

• Packet (32 bytes) << RAM (4K) << program (128K) < external flash (512K)

i100% reliabilityiRapid propagation or small time to completioniEventual consistencyiScalability (wrt network size and density)

Page 7: Wireless Sensor Network Reprogramming: Data Dissemination

7

Goal and Issues

g IssuesiDifficult task of verifying and updating the version of the

code in question on each mote in the networkiWhile avoiding conflicts and reducing idle waiting time of

individual moteiDifferent from reliable multicast due to the expected size of

the uploaded code objectiLow-cost sensors usually do not have the highest grade of

radio transmission capabilities

Page 8: Wireless Sensor Network Reprogramming: Data Dissemination

8

Difficulties of Multi-hop Programming Scheme

g Collisions when two nearby motes in a network try to talk to a single mote at the same time iA common problem exacerbated in large networksiHidden terminal problem when two senders out of range of

each other attempt to transmit to the same receiver at the same timeiMotes in the interior of the sensor field have more neighbors

and are more susceptible to the hidden terminal problemiImpact on the speed of propagation

g When to reboot the motes into the new imageiIf a mote is rebooted too soon, nearby motes may not

benefit from the services the mote can provide (e.g., continued propagation of the code image)iIf rebooted too late, sit idle for a long time wasting battery

power

Page 9: Wireless Sensor Network Reprogramming: Data Dissemination

9

Deluge: Overview

g An epidemic protocol and operates as a state machine

g Each node follows a set of strictly local rules to achieve a desired global behavior

g Each node occasionally advertises the most recent version of the data object it has available to whatever nodes that can hear its local broadcast

g If S receives an advertisement from an older node, R, S responds with its object profile

g From the object profile, R determines which portions of the data need updating and requests them from any neighbor that advertises the availability of the needed data, including S

Page 10: Wireless Sensor Network Reprogramming: Data Dissemination

10

Deluge: Overview

g Nodes receiving requests then broadcast any requested data

g Nodes then advertise newly received data in order to propagate it further

Page 11: Wireless Sensor Network Reprogramming: Data Dissemination

11

Deluge: subtle issues to achieve high performance

g Node density-awareness iRedundant advertisements and request messages are

suppressed to minimize contention – avoid congestion collapse• Backoffs introduce latency (negative)

g Protocols robust to asymmetric linksiA link in one direction can have a significantly different loss

rate in the other directioniDeluge’s three-phase handshaking protocol helps ensure

that a bi-directional link exists before transferring dataiIf a node has not completely received its data after making k

requests, it searches for a new neighbor to request data

Page 12: Wireless Sensor Network Reprogramming: Data Dissemination

12

Deluge: subtle issues to achieve high performance

g Deluge dynamically adjusts the rate of advertisements to allow quick propagation when needed while consuming few resources in the steady state

g Attempts to minimize the set of nodes concurrently broadcasting data within a given cell

g Emphasizing the spatial multiplexing to allow parallel transfers of data

Page 13: Wireless Sensor Network Reprogramming: Data Dissemination

13

Deluge Protocol Overview

Page 14: Wireless Sensor Network Reprogramming: Data Dissemination

14

Deluge Protocol Overview

Page 15: Wireless Sensor Network Reprogramming: Data Dissemination

15

Deluge Protocol Overview

Page 16: Wireless Sensor Network Reprogramming: Data Dissemination

16

Deluge Protocol Overview

Page 17: Wireless Sensor Network Reprogramming: Data Dissemination

17

Deluge Protocol Overview

Page 18: Wireless Sensor Network Reprogramming: Data Dissemination

18

Deluge Protocol Overview

Page 19: Wireless Sensor Network Reprogramming: Data Dissemination

19

Deluge Protocol Properties

g Simpleg Storage hierarchyg High reliabilityg Spatial multiplexingg Epidemic eventual consistencyg No neighbor state managementg Density-awareg Robust to asymmetric links

Page 20: Wireless Sensor Network Reprogramming: Data Dissemination

20

Data Representation

g Monotone increasing version number

g Object divided into Pcontinuous pages, each contains N packetsiCRC at packet and page

levelsg Reduced RAM requirements

for maintaining state about which packets are needed

g Allows for spatial multiplexing

Page 21: Wireless Sensor Network Reprogramming: Data Dissemination

21

Data Representation

g Object profile (v, a)g Age vector a = <a0, a1, …, ap-1>iContents of page i at version v last changed at version v-ai

g Summary of object profileiA page i is complete if every packet for that page has been

correctly receivediPage i is available only if it is complete and all pages in the

range [0, i] are also completeiSummary of object profile {v, γ}

• v: version number• γ: the largest numbered page available for transfer

Page 22: Wireless Sensor Network Reprogramming: Data Dissemination

22

Spatial Multiplexing

g Propagate in “waves”g Exploit limited range of radio

to allow for concurrent broadcasts

g Reduced completion time O(d + Sobj) vs. O(d * Sobj)

Page 23: Wireless Sensor Network Reprogramming: Data Dissemination

23

Protocol Detail: Maintain

g A node in the Maintain state is responsible for ensuring that all nodes within communication range haveiThe latest version of the object profileiAll available data for the latest version

g Each node occasionally advertises a summary on the object profile of its current version

Page 24: Wireless Sensor Network Reprogramming: Data Dissemination

24

Protocol Detail: Maintain

g Advertise: version and fraction of image that is completeiNodes request pages in sequential

order

g Manage advertisement broadcastsg Uses suppression to decrease

advertisement rate as neighbors increase

g Bounds advertisement rate independent of node density

Page 25: Wireless Sensor Network Reprogramming: Data Dissemination

25

Protocol Detail: Maintain

g Time divided into a series of rounds and nodes choose whether or not to broadcast an advertisement in each round of a certain length τ(adjustable, but τmin <τ< τmax)

g A node waits for a linear backoffperiod t from [τ/2,τ] after a round startsiBroadcast a summary after waiting t

only if less than k advertisements with the same summary have been received

Page 26: Wireless Sensor Network Reprogramming: Data Dissemination

26

Protocol Detail: Maintain

g If a different profile summary, or requests, or data packets are heard during round i, iτ= τmin and begin a new round

g At the beginning of a round i, if no overheard packet indicates an inconsistency among neighbors during the previous roundiDouble the length of a round, τ=

min(2 τ, τmax)

Page 27: Wireless Sensor Network Reprogramming: Data Dissemination

27

Protocol Detail: Maintaing A node can determine if any of its

neighbors have an old object profile

g If so, a node must broadcast the new object profile if less than kattempts to update the object profile to version v have been overheard

g During round i, transmit the object profile for version v only if ian advertisement with version v’<v

was received after a random wait andiLess then k attempts to update the

object profile to version v have been overhead

Page 28: Wireless Sensor Network Reprogramming: Data Dissemination

28

Protocol Detail: Maintaing During round i, transmit the object

profile for version v only if ian advertisement with version v’<v

was received after a random wait andiLess then k attempts to update the

object profile to version v have been overhead

g Bounds advertisement rate independent of node density

g Essentially, controlled floodiLow redundancyiQuick propagationiEpidemic property helps to ensure

eventual propagation to all nodes

Page 29: Wireless Sensor Network Reprogramming: Data Dissemination

29

Protocol Detail: Maintaing For a node with summary {v,γ},

transition toiTransmit on receiving a request for

data from a page less or equal toγiRequest on receiving an

advertisement with new data (e.g., from a node with a larger fraction of the complete image)• Unless a request for a page less

than or equal to γ was previously received, or

• Unless a data packet for page less than or equal to γ+1 was previously received

Page 30: Wireless Sensor Network Reprogramming: Data Dissemination

30

Protocol Detail: Maintaing Number of transmitted

advertisements in a given cell, the set of nodes which may become senders during any round is also bounded

g Deluge requests data from the node which most recently advertised the needed page

g If R overhears a data packet of the needed page, it suppresses any requests for a full round and attempts to snoop as much as possible

g Exploit suppression to minimize the set of senders

Page 31: Wireless Sensor Network Reprogramming: Data Dissemination

31

Protocol Detail: Spatial multiplexing

g Deluge advertises the availability of a complete page even before all pages in the object are complete

g Allow the further propagation of newly received pages

g One drawbackiThe entire network must remain powered-on to achieve the

full benefits of spatial multiplexing

g Without spatial multiplexing, propagation across a network of d hops requires d complete object transfers, requiring a time of O(d · Sobj )

g Pipelining the transfer approaches a time of O(d+Sobj)

Page 32: Wireless Sensor Network Reprogramming: Data Dissemination

32

Protocol Detail: Requestg A node in Request state is

responsible for actively requesting the remaining packets required to complete a page

g To achieve density-awareness, requests are made with a random backoff to help minimize collisions with requests from other nodes

g Transmit a requestiAfter a random backoffiSuppress if

• Any similar requests or data packets are overheard during the backoff period

iMinimize senders by unicastingrequest to the node that advertised

Page 33: Wireless Sensor Network Reprogramming: Data Dissemination

33

Protocol Detail: Requestg Transition to MaintainiAfter receiving all packets of a pageiAfterΛrequests, to tolerate

asymmetric link even if page is incomplete• A node R receiving advertisements

from S may not be able to communicate requests to S

iThe rate of requests from R will decrease with the decreasing advertisement rate in the steady stateiIf node S cannot communicate

advertisements to R, then R will not transmit any requests to S

Page 34: Wireless Sensor Network Reprogramming: Data Dissemination

34

Protocol Detail: Transmit

g A node in Transmit state is responsible for broadcasting all requested packets for a given page

g Transmit all requested packetsiMay receive requests when transmitting

g Deluge services requests by taking the union of any new requests with previous requests not yet serviced

g Packets are sent in round-robin order to provide fairness among requesters

g Transition to Maintain when all requested packets are transmitted

Page 35: Wireless Sensor Network Reprogramming: Data Dissemination

35

Evaluation Metrics

g Complete reliabilityiEvery byte of data must be correctly received by all nodes

g Completion timeiInterruption to the primary service caused by network

programming should be minimizediNetwork programming should quickly install updates to

shorten debugging and testing cycle

g RAM usageiSeverely constrained by available memory; lack of dynamic

memory allocation

g Energy consumptioniMinimize energy consumed to lengthen the lifetime

Page 36: Wireless Sensor Network Reprogramming: Data Dissemination

36

Parameter Setting

g τmin = 2 seconds τmax = 60 seconds g k = 1 Λ= 2 g 2 requests/secondg Deluge pushes ~90 bytes/second on average

Page 37: Wireless Sensor Network Reprogramming: Data Dissemination

Nov. 3, 2004 SenSys 2004 40

What’s the lower bound?

• Lower bound on completion time– Dissemination >> routing a single packet

• Spatial multiplexing < Without spatial multiplexing– One-third ECB in ideal networks– One-fifth ECP in realistic networks– Packet-loss not considered– Use of selective and delayed retransmission in

unpredictable networks

• Deluge transmits at one-ninth ECB

• Deluge is within a factor of 2.

Page 38: Wireless Sensor Network Reprogramming: Data Dissemination

37

Disadvantages of Deluge

g Uncontrollable nature of its underlying algorithmg It is not very energy efficientg As motes wait for their requests to be fulfilled, a large

amount of idle listening takes placeg Since motes automatically updates a newer version

of the code from their neighbors, if there are ndifferent versions of the code object in the field, iThe code on each individual mote is reprogrammed up to n-

1 timesg There is no way to know the current status of the

reprogramming as it spreads across the field because Deluge offers no feedback to the operator

Page 39: Wireless Sensor Network Reprogramming: Data Dissemination

38

Disadvantages of Deluge

g Lowering channel utilization is effective in eliminating the hidden terminal problem and minimizing the difference in propagation rates between the edge and diagonal

g This will however lower the overall propagation rate and prolong completion time

Page 40: Wireless Sensor Network Reprogramming: Data Dissemination

39

Other Network Reprogramming Schemes

g Sender selection algorithm iMultihop network programming (MNP)

g Rippling algorithmiMultihop over-the-air programming (MOAP)

g Time division multiple access based network programming algorithmiInfuse

Page 41: Wireless Sensor Network Reprogramming: Data Dissemination

40

Multihop Network (re)Programming (MNP)

g The hidden terminal problem runs rampant in Delugeg Sender selection algorithm tries to rectify this by

taking an organized approach to reprogramming by using a sender selection protocol to idecide which motes, upon receiving the new code object,

should transmit it to the motes in their neighborhood andiwhich mote should remain silent

g Advertisement message contains: ReqCtr(# of distinct requests received from different neighboring requesters)

g Request message: also includes ReqCtr received from advertisement message

g Sender overhearing ReqCtr in Request message refrains from responding if its own ReqCtr is smaller

Page 42: Wireless Sensor Network Reprogramming: Data Dissemination

41

Multihop Network (re)Programming (MNP)

g Winner transmits the code; it then quits the competition temporarily by “sleeping” for a whileiAllow other sources to become senderiDistribute transmission load

g MNP seems to eliminate a fair amount of the problems suffered and it does so fairly quickly

g An in-field demo performed on Mica2s on a 10x10 networkiA program of 1000 packets was propagated throughout the

network in 6 minutesiActive radio time was roughly 38% of that time

Page 43: Wireless Sensor Network Reprogramming: Data Dissemination

42

Multihop Over-the-air Programming (MOAP)

g Improve upon epidemic algorithms by guaranteeing that, iIn every subset of motes in the field, there is only one

sender amidst multiple receiversg Use NACK, local repairg MOAP incorporates two other unique ideas:iA unicast retransmission policyiA sliding window segment management scheme to keep

track of received segmentsiWorking together, these two ideas help make it easy to

detect which code segment is missing and how best to ask for it

g MOAP can result in a drastic reduction in the amount of traffic over an epidemic algorithmiAlmost 50% and greatly reduce the amount of energy

needed

Page 44: Wireless Sensor Network Reprogramming: Data Dissemination

43

Infuse

g Use TDMA MAC that guarantees no collisioniWhenever the successors of a sensor (say, j) forward the

data capsule (say, c), j gets an implicit acknowledgmentiA sensor will retransmit a capsule only when it does not

receive an implicit acknowledgment from its active neighborsg Need a priori topology information (well defined grids)

to for time synchronization to organize all the motes in the field so that proper time slots can be distributed

g Turn radios off when it is not their time slot, saving energy

g Infuse increased energy savings during programming by up to 900% over Deluge

g Not able to support true ad hoc networking

Page 45: Wireless Sensor Network Reprogramming: Data Dissemination

44

Secure Reprogramming

g “Securing the Deluge Network Programming System” Information Processing in Sensor Networks, IPSN 2006.

g “Hash-based Secure Sensor Network Programming Method without Public Key Cryptography” Workshop on World-Sensor-Web (WSW'2006), SenSys 2006.

Page 46: Wireless Sensor Network Reprogramming: Data Dissemination

45

Summary

g Deluge has the most extensive user baseg Sender selection algorithm (MNP) appears to be the

best iQuick and energy efficient

g TDMA based algorithms (Infuse) need more work so that they can be used with ad-hoc wireless networks

g Rippling algorithms (MOAP) while offering benefits over the epidemic algorithms, are not quite on par with sender selection algorithms

g Reliably sending a potentially large code image to every mote in an ad-hoc wireless sensor field is a difficult problem due toiConstraints imposed by the hardwareiThe nature of multi-hopping