270 likes | 392 Views
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems. Spring 2009 Prof. Jennifer Welch. Lecture 27. Topic: Local Coordination Services Sources: Luo & Hubaux Welsh & Mainland. Overview of NASCENT [LH]. Targets vicinity ad hoc groups (VAGs) small scale networks
E N D
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch
Lecture 27 • Topic: • Local Coordination Services • Sources: • Luo & Hubaux • Welsh & Mainland Discrete Algs for Mobile Wireless Sys
Overview of NASCENT [LH] • Targets vicinity ad hoc groups (VAGs) • small scale networks • transient networks • need primarily group-oriented communications • Examples: • wireless multi-player gaming • cooperative robotics • cooperative driving system • Describes a network layer service with • membership service • routing structure that is dynamically modified • efficient support for reliable bcast, resource alloc, etc. Discrete Algs for Mobile Wireless Sys
Model Assumptions • small-scale ad hoc network • diameter about 3 or 4 • every node has a unique address (~id) • bidirectional FIFO message links • reliable unicast, unreliable bcast • communication graph changes dynamically, not necessarily connected • "each member [of a VAG] is aware of the mobility group defined by its VAG application" • implies partitions seldom occur (?) Discrete Algs for Mobile Wireless Sys
MX LE RB NASCENT: local membership tracking DAG maintenance token passing MAC and Physical Layer NASCENT Architecture • local membership b/c global is expensive in face of dynamic changes • DAG: logical structure for routing messages; redundancy • token circulation: efficient way to support RB and ME …. Discrete Algs for Mobile Wireless Sys
Local Membership Tracking • each VAG member periodically bcasts a beacon msg containing ids of its neighbors • when receiving a bmsg with ids, include the ids in the local view • remove an id from local view if no bmsg is received from that node w/in a certain time period • relies on timing behavior • how are 2-hop neighbors removed? Discrete Algs for Mobile Wireless Sys
DAG Maintenance • Essentially partial reversal (triple) algorithm of [Gafni & Bertsekas] • Algorithm for initialization is given: • eventually there is a unique sink, which can generate a unique token • Algorithms for group merging and members joining and leaving are also given Discrete Algs for Mobile Wireless Sys
Token Passing • Circulate a token within the VAG • token is a message containing certain system states • can be generated initially by unique sink in the DAG • Two algorithms are given • TPP-Q, which uses queueing • similar to [Walter, Welch & Vaidya] • TPP-R, which uses recency information • similar to [Malpani, Vaidya, Welch & Chen] Discrete Algs for Mobile Wireless Sys
TTP-Q • Each node keeps a queue • Non-token holder: • enqueues on its own queue its request to get the token and • forwards its request to node in its local view (2-hop neighborhood) w/ minimum id • Builds a rooted spanning tree • Token travels along tree edges repeatedly Discrete Algs for Mobile Wireless Sys
TPP-R • Each node keeps an array recording most recent time when the token has visited each neighbor • When a node receives the token, it is "visited" by the token (uses it) only if the node has the lowest recency info among all its neighbors • Recency info is piggybacked on the token • Usually TPP-R has smaller circulation period than TPP-Q because shortcuts can be used to avoid backtracking • But worst-case upper bound on the period is larger in TPP-R than in TPP-Q Discrete Algs for Mobile Wireless Sys
Detecting Partitions • Because of topology changes, a node might fail to get the token back (partition separates the current location of the token from the node) • Detect this situation with a timer • relies on timing behavior • If timer goes off, then all nodes disconnected from the token do the initialization and token generation again Discrete Algs for Mobile Wireless Sys
Distributed Algorithms on Top of NASCENT • By using the NASCENT services, algorithms can be designed more simply • Several examples are given: • resource allocation (including mutual exclusion) • ordered reliable broadcast • leader election • What's the criterion for which primitives go inside NASCENT and which go on top of it? • I.e., the 3 problems above could go inside NASCENT; leader election can be solved using a variant of the DAG, etc. Discrete Algs for Mobile Wireless Sys
Resource Allocation • The token generation and circulation already solves mutual exclusion • What about a more general version of the problem with multiple copies (m) of the resource in the system? • keep m "subtokens" in the token • as the token circulates, some of the subtokens can be "grabbed" • order requests using a queue to ensure fairness Discrete Algs for Mobile Wireless Sys
Ordered Reliable Broadcast • Similar to [Maxemchuk & Shur] • A node bcasts a msg only when it has the token • "leverages on the token-oriented DAG" • A node delivers msgs according to their order in the token Discrete Algs for Mobile Wireless Sys
Leader Election • Each candidate waits to get the token • Upon getting the token, it uses the ordered reliable bcast to bcast its id • Whichever candidate's msg is ordered first by the bcast service becomes the leader Discrete Algs for Mobile Wireless Sys
Analysis • Showed that the time and communication complexity of maintaining NASCENT is similar to that of unicast routing protocols, when reacting to one topology change • Studied the [Hadzilacos & Toueg] reliable bcast algorithm on top of DSDV vs. their reliable bcast algorithm on top of NASCENT and argued the latter is better Discrete Algs for Mobile Wireless Sys
Simulations • Did some ns-2 simulations • Studied "stability" of token circulation • distribution of the circulation period has small variance • token visits each member infinitely often • Compared TPP-Q and TPP-R • relationship between beacon period and sojourn time affects which is better Discrete Algs for Mobile Wireless Sys
Programming Sensor Networks Using Abstract Regions [WM] • Suite of general-purpose communication primitives for sensor networks: • addressing • data sharing • data reduction all within local regions of the network • Provide application programmer with control over resource consumption (e.g., energy) Discrete Algs for Mobile Wireless Sys
Abstract Regions • "Family of spatial operators" • Capture local communication with regions • A region can be defined by • radio connectivity • geographic location, … • Support data sharing using a tuple-space-like programming model • Provide efficient aggregation operations • Expose tradeoff b/w accuracy and resource usage • tunable as network conditions change Discrete Algs for Mobile Wireless Sys
Motivation • Sensor network application designers spend a lot of effort on low-level machinery for • routing • data collection • energy management • Provide a higher-level programming interface • Analogous to MPI Discrete Algs for Mobile Wireless Sys
Definition of an Abstract Region • Defines a neighborhood relationship between a node and other nodes in the network • Examples: • set of nodes within N hops • set of nodes within distance d • Operations are done by sharing data and coordinating activity among nodes in the neighborhood • A node can belong to multiple abstract regions Discrete Algs for Mobile Wireless Sys
Operations on Abstract Regions • Neighbor discovery • implement by bcasting, collecting info on node locations, or estimating radio link quality • ongoing process • node can terminate it at some oint and get back an estimate of the accuracy of the result • Enumeration • returns set of nodesin the region so they can be addressed • Data sharing with get and put • implement via message-passing, bcasting or gossip • Reduction • applies an associative operator (e.g., sum, max) to all nodes • implement by propagating values up a tree,… Discrete Algs for Mobile Wireless Sys
Some Abstract Regions • nodes w/in N hops • nodes w/in N hops and distance d • k nearest nodes w/in N hops • k nodes w/in N hops with highest link quality (fraction of packets not dropped) • approximate planar mesh • spanning tree (for aggregation over entire network) Discrete Algs for Mobile Wireless Sys
Implementing Abstract Regions • Approximate planar mesh: • use pruned Yao graph • Spanning tree: • node tries to choose parent to maximize link quality and minimize hop count to root Discrete Algs for Mobile Wireless Sys
Feedback and Tuning • Quality feedback examples: • Member discovery: fraction of nodes found • Reduction: fraction of nodes in region that participated • Tuning interface: • specify low-level parameters of the region implementation (number of messages, time,…) • can be used to implement adaptive control mechanisms that automatically tune region parameters to meet some target Discrete Algs for Mobile Wireless Sys
Implementation • Abstract regions implemented in TinyOS • Applications implemented on top of abstract regions: • object tracking: uses regions consisting of 8 nearest neighbors; communication is through the "put" operation; reduction is done and result sent to a base station • contour finding: uses approximate planar mesh region • directed diffusion: uses spanning tree region • geographic routing with GPSR: uses radio neighborhood regions and approximate planar mesh region Discrete Algs for Mobile Wireless Sys
Evaluation • Through TOSSIM simulation enironment Discrete Algs for Mobile Wireless Sys