290 likes | 418 Views
Services and Algorithms for Sensor Networks: a Theoretical Perspective. Nancy Lynch, MIT NEST PI Meeting July, 2003. Project description. High. Middle. Low. Identify services useful in sensor networks; define them as problems for theoretical study.
E N D
Services and Algorithms for Sensor Networks: a Theoretical Perspective Nancy Lynch, MIT NEST PI Meeting July, 2003
Project description High Middle Low • Identify services useful in sensor networks; define them as problems for theoretical study. • Model them using timed or hybrid I/O automata. • Define cost metrics: Power consumption, communication load, response latency, result accuracy, stabilization time • Examples: • High level: Routing, tracking; maintaining data objects • Middle level: Establishing and maintaining communication structures • Low level: Time synchronization, localization • Design, analyze algorithms that solve these problems. • Obtain lower bounds for the costs of solutions, tradeoffs.
Recent and current work 1. Implementing atomic objects in dynamic networks [Lynch, Shvartsman DISC 02], [Gilbert, Lynch, Shvartsman DSN 03], [Dolev, Gilbert, Lynch, Shvartsman, Welch DISC 03] [Fan, Lynch DISC 03], [Musial, Shvartsman], 2. Topology control for wireless networks using power minimization [Bahramgiri, Hajiaghayi, Mirrokni IC3N 02], [Hajiaghayi, Immorlica, Mirrokni MobiCom 03] 3. Routing and tracking in sensor nets [Demirbas, Nolte, Arora, Lynch] 4. Time synchronization in sensor nets [Chakraborty, Fan, Lynch, Patt-Shamir] 5. Also related: IOA distributed code generation [Tauber, Maroti]
Talk contents • January NEST PI meeting, San Diego: 1. Atomic objects in dynamic networks 2. Topology control with power minimization • Today: Review and update 1 and 2, and introduce: 3. Routing and tracking 4. Time synchronization 5. IOA distributed code generation
1. Implementing atomic read/write objects in dynamic networks • Atomic objects: • Just like centralized shared memory • Dynamic networks: • Participants may join, leave, fail during computation. • Examples: Mobile networks, sensor networks. • Requirements: • Any participant can read or write. • Atomicity for all patterns of asynchrony and change. • Good performance under reasonable assumptions about asynchrony and change. • High availability.
RAMBO[Lynch, Shvartsman DISC 02] RAMBO • Replicates objects at several network locations. • To accommodate small, transient changes: • Uses configurations: • members, read-quorums, write-quorums. • Read, write operations access quorums, using two-phase algorithm • Allows lots of concurrency. • Maintains atomicity during stable periods. • To handle larger, more permanent changes: • Reconfigure • Reconfigure concurrently with reads/writes, no heavyweight view change. • Maintains atomicity across configuration changes.
RAMBO algorithm RRAMBO Recon Net • Recon service: • Provides consistent sequence of configurations. • Implemented using distributed consensus. • Main algorithm: • Manages reading and writing of objects. • Removes (“garbage-collects”) old configurations. • Uses another two-phase algorithm. • Reads/writes may use several configurations. • Everything is done concurrently.
Recent progress • RAMBO II [Gilbert, Lynch, Shvartsman DSN 03] • A new algorithm for garbage-collecting many old configurations concurrently. • Reduces g-c time. • LAN implementation [Musial, Shvartsman] • Separating data and metadata [Fan, Lynch, DISC 03] • Data is often much larger than synchronization metadata. • In some parts of algorithms, can use metadata only. • Reduces communication.
More recent progress read write • Implementing atomic memory in mobile networks • GeoQuorums approach [Dolev, Gilbert, Lynch, Shvartsman, Welch DISC 03] • Mobile nodes implement abstract virtual machines associated with geographical locations. • Main algorithm uses the abstract virtual machines.
Remains to do: • RAMBO: • More algorithmic improvements, extensions • Reducing communication, latency. • Choosing good configurations. • Backup strategies for when quorums fail. • Extensions to stronger types of memory. • Prove corresponding impossibility results. • Geoquorums: • Refine, extend the approach • Apply it to more problems
2. Topology control for wireless networks, using power minimization [Bahramgiri, Hajiaghayi, Mirrokni, IC3N 02][Hajiaghayi, Immorlica, Mirrokni MobiCom 03] • Problem: • Create, maintain a multiply-connected global routing structure in a wireless ad hoc network. • Minimize power consumption. • Assumes: • Nodes can control their power level, up to some max R. • Power needed to send a message to distance r is rx , where 2 x 4.
Distributed topology control algorithm [Bahramgiri, Hajiaghayi, Mirrokni, IC3N 02] • Extends work of [Li, Halpern, et al. 01] • Assume underlying k-connected graph G: • Node for each process • Edge (i,j) if and only if dist(i,j) R • Problem: For each node i, determine r(i) R such that the reduced graph Gris k-connected, where: • Gr has same nodes as G • (i,j) is an edge of Gr iff dist(i,j) min(r(i), r(j)), that is, i and j can communicate both ways after power reduction. • Try to minimize the r(i) values.
K-connectivity • Definition: • G is k-connected iff after removing any k-1 nodes, G is still connected. • Equivalently, k disjoint paths between every two nodes. • Motivation: • Want network that remains connected after failure of k-1 nodes.
Angle graphs • For angle size , define G to be the reduced graph Gr, where, for every i, r(i) is defined as follows: • If every slice of radius R with angle contains at least one other node of G, then let r(i) be the smallest radius with this property. • Otherwise, r(i) = R. • Theorem [Li, Halpern, et al]: • If the original G is connected, then G2/3 is connected. • 2/3 is the largest angle that works. • Distributed algorithm to construct G.
Extension to k-connectivity[Bahramgiri, Hajiaghayi, Mirrokni 02] • Theorem: • If the original G is k-connected, then G2/3k is k-connected. • Simply divides the angle size by k. • Theorem: • If k is even then 2/3k is necessary. • If k is odd then 2/3(k-1) is necessary. • Extensions of results to 3-space
Recent progress[Hajiaghayi, Immorlica, Mirrokni MobiCom 03] • Defined global power consumption measure. • Problem: Find k-connected subgraph of underlying graph G that minimizes global power consumption. • NP-hard • Three approximation algorithms: • O(k log k) approximation, for general graphs, general k. • O(k) approximation (harder). • O(1) approximation, for k = 2, 3, in geometric graphs (distances satisfy triangle inequality). • Practical distributed algorithm, for approximation 3. • Based on a minimum spanning tree algorithm.
3. Tracking objects in Sensor Nets[Demirbas, Nolte, Arora, Lynch] • Problem: Design a scalable data structure to support tracking and finding mobile objects in a sensor network • Low tracking cost: Based on distance object moves. • Low finding cost: Based on distance to object. • Self-stabilizing, fault-containing • Assumptions: • Mote clocks increase at same speed • Motes may suffer state corruptions • Communication time between motes proportional to distance • Objects move from mote to neighboring mote. • Object speed much slower than communication speed. • Hierarchical partitioning service available.
Hierarchical partitioning service[Demirbas, Arora] • Higher level clusters have larger radius • Clusterheads know children, neighbor, and parent clusterheads
Hierarchical tracking path • Based on ideas in [Awerbuch, Peleg 95] distributed directory service. • Maintains tracking information with accuracy inversely proportional to distance from mobile object. • Constructed on top of hierarchical partitioning service. • One tracking path, consisting of clusterheads, from top-level clusterhead to mobile object.
Stabilization and fault containment • Tracking path stabilizes after state corruption: • Shrink action, cleans dangling paths • Grow action, corrects and rebuilds upper levels of the path • Fault containment accomplished with timing: • Shrink/grow actions propagate faster at lower levels • Erroneous actions (initiated due to state corruption) can be overtaken and disabled.
Find and track operations: Preliminary version • Not self-stabilizing, not concurrent • Finding the object: • Query clusterheads and their neighbors at increasingly higher levels until the tracking path is found. • Then follow tracking path to the object. • Tracking • Propagate information about object location up the partition hierarchy until it meets the tracking path. • Clean out the old portion of the tracking path below this point. • A complication: Lateral links • Created when the mobile object crosses cluster boundaries • Designed to prevent non-local updates to tracking path
Remains to do: • Extend stabilization actions (shrink/grow) to account for lateral links. • Handle concurrency between find operations and object moves. • Additional bookkeeping required to guarantee that find succeeds. • Quantify speed assumptions to guarantee successful find • Extend to variable message delay model. • Tradeoff between information maintained and time to find target.
4. Time synchronization in Sensor Nets[Chakraborty, Fan, Lynch, Patt-Shamir] • Synchronized time needed: • To schedule broadcasts, avoiding collisions. • To generate timestamps for events, for coordinated event processing. • Goals: • When external source (GPS) is available, motes should synchronize their times with it. • Otherwise, just synchronize with each other. • Closer motes should achieve closer synchronization. • Useful for local broadcast collision resolution. • Fault-tolerant • Easy to implement, energy efficient
Basic algorithm • Mote has hardware clock subject to drift rate ρ • Computes local time local[curr]: • Starts with curr = 0, local[curr] = hardware clock. • Runs local[curr] at rate of hardware clock. • When it hears GPS time has reached t > local[curr]: • Stops local[curr]. • Increments curr. • Sets local[curr]:= t. • Runs new local[curr] at rate of hardware clock. • Computes synchronized time: • Motes exchange local[curr] values, using synch messages. • Motes remember local[j]for other nodes j • Mote’s synchronized time is maximum known local time.
Properties • Time synchronization properties • Bound on skew with respect to real time: • ρT , where T = time between GPS inputs • Bound on skew with respect to each other: • (1 + 2ρ) S , where S = time between synch messages • Additive error term: • O(Dδ), where D = network diameter and δ = link delay • Gradient properties • For motes distance d apart, replace O(Dδ) error term by O(dδ) • Fully distributed, fault-tolerant • Motes don’t need to know each other, topology, no leaders, etc. • Failures have no effect on synchronization • Efficient, easy to implement • Simulations show good performance.
Remains to do: • (For mobile networks) Study effects of mobility on the behavior of the algorithm. • Tolerate Byzantine faults • Incorporating upper/lower bounds on link delay • Optimize message transmission • More simulation results
5. IOA Code Generation [Tauber] • IOA: Modeling/programming language for describing distributed algorithms and services. • Supports formal verification, simulation. • Code generation target: • Java application on networked workstations using MPI. • Code generation method: • Model local system services (network interface, console) as auxiliary automata. • Compose user program with auxiliary automata to create node automaton, using “Composer” utility. • Compile each node automaton into Java code for one machine.
Connections with ISIS (Vanderbilt) • ISIS: • Graphical modeling tools • Generate IOA programs for NEST-style services • Programs compiled to run on TinyOS • Preliminary discussions [Maroti, Tauber]: • IOA models for: • NEST services • TinyOS compilation target • Comparison/integration of code generation strategies
Future plans • Finish our projects on: • Time synchronization • Self-stabilizing tracking • Atomic object maintenance • Topology control • Consider other problems: • Maintaining clusters, leaders, spanning trees,… • Catalog of I/O automaton specs for NEST services.