29
1 DNA Research Group CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein Columbia University

DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

  • View
    213

  • Download
    0

Embed Size (px)

Citation preview

Page 1: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

1DNA Research Group

CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor

Networks

Abhinav Kamra, Vishal Misra and Dan Rubenstein

Columbia University

Page 2: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

2ACM SenSys 2007

A few definitions

Distributive queries (e.g. MIN, MAX, COUNT, SUM) Form: f(p U q) = f( f(p), f(q) ) e.g. Sum: f(p U q) = |p| + |q|

(p, q = set of disjoint nodes)

34

6

6

5

35

6MAX distributive query

Two types of queries: Duplicate-sensitive: e.g. SUM, COUNT Duplicate-insensitive: e.g. MIN, MAX

Page 3: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

3ACM SenSys 2007

Traditional data aggregation

Goal: Combine data values while routing to the sink

2

15

12

15

12

3

16

9

Example aggregation using SUM query

Page 4: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

4ACM SenSys 2007

Data aggregation in sensor networks:Tree-based schemes

e.g. TAG1 [Madden02], Directed Diffusion [Govindan00]

Setup a spanning tree Aggregate in-network along

the paths Pros:

Low bandwidth usage Small message size

Cons: High cost of communication failures Bottleneck near the sink (root) Lacks accuracy in high failure scenarios

network

spanning tree

Page 5: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

5ACM SenSys 2007

Data aggregation in sensor networks:Multi-path schemes

e.g. TAG2 [Madden02], Synopsis Diffusion [Nath04]

Setup a DAG Partial results to multiple neighbors Pros:

Robust to failures High Reliability

Cons: High bandwidth usage Redundant and duplicate transmissions Lacks accuracy in high failure scenarios

network

DAG

Page 6: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

6ACM SenSys 2007

What is lacking so far? Tree-based

Error-prone in dynamic networks Not accurate in failure-prone settings

Multi-path Bandwidth overkill in stable networks Have to avoid duplicate and redundant data Still loses accuracy in high mobility/loss

scenarios

Different aggregation approaches

Different network conditions

Page 7: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

7ACM SenSys 2007

CountTorrent: An adaptive approach

Adapt to network conditions: Stable networks: accurate tree-based aggregation Dynamic networks: multi-path aggregation,

accuracy degrades gracefully Completely distributed: local decisions Can compute duplicate-sensitive and

duplicate-insensitive query aggregates

Page 8: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

8ACM SenSys 2007

Network model

Traditional setup: Set of connected sensor nodes (20 –

1000) Nodes can join, leave, fail Limited communication range (10s of

meters) Each node has a small buffer (~64 kB)

Page 9: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

9ACM SenSys 2007

CountTorrent: A conceptual overview

Divide and conquer strategy Arrange information in a hierarchy using a (prefix-

free) binary labeling Combine disjoint information Adapt the labeling as network changes

0

1

10

11

•Arranging the nodes in a virtual binary tree

•Any node can be root / sink00

01

Page 10: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

10ACM SenSys 2007

Observation:

Labeling is Prefix-free

CountTorrent: Label assignment Each node is assigned a unique

(binary) label by its parent: Implicitly building a tree

When a new node joins Chooses one of its neighbors as parent Parent splits its label L into 2 separate

labels L0 and L1: Child given label L1h10

10

11

h2

h3

0001

h1

10

11

h2

h3

h4h4

Node h4 joins

0

Chooses h1 as parent

Page 11: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

11ACM SenSys 2007

CountTorrent: Data combining After a label is assigned to each node

All labels can be merged to form ε

00

011

0

110

00

01111

4

7

5

1

7

9

8

9

ε17

Data combining using SUM query

Works for any distributive query type

Page 12: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

12ACM SenSys 2007

CountTorrent: Data combining Aggregating with tuples

Tuple = (binary label, aggregate value) pair

Labels differ only in last bit merge tuples

Label1 = Prefix(Label2) Ignore Label2(11, 5)(01, 3)(001, 2) (011, 1)(10, 3)(001, 2)

(011, 1) (11, 5)(10, 3)(001, 2)

(011, 1)(1, 8)(001, 2)

Basic CountTorrent Strategy

•Neighbors randomly exchange tuples

•Merge whenever possible

Node A Node B

Page 13: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

13ACM SenSys 2007

Fine-tuning CountTorrent Random exchange is not efficient:

Convergence is slow Optimizations:

Intelligent Selection Carefully choose data to send to neighbors Minimize redundant and duplicate tuple

exchanges Preferred Diffusion

Carefully choose neighbor to send data to Fast convergence in stable networks

Page 14: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

14ACM SenSys 2007

CountTorrent: Intelligent Selection Node A sending to neighbor B

Remembers what was sent to B Remembers what was received from B Only send tuples that are useful for B

(11, 5)(01, 3)(001, 2) (10, 3)(001, 2)

(11, 5)(10, 3)(001, 2)

(11, 5)(01, 3)(001, 2) (1, 8)(001, 2)?

•Passive reception (wireless) can save transmissions

Node A Node B

Page 15: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

15ACM SenSys 2007

CountTorrent: Preferred Diffusion

Preferential forwarding: If any tuple useful for parent Send Else, if any tuple useful for a child

Send Else, send to another neighbor

Stable networks: Mimics tree-based aggregation

Dynamic network: mix of tree-based and multi-path

Page 16: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

16ACM SenSys 2007

Simulations / ExperimentsCompare the accuracy and resilience of

CountTorrent

1. Simulations: Compare with other aggregation methods Effect of Node joins/failures Aggregation in a mobile network

2. Experiments on Tossim / motes: CountTorrent implementation on

Crossbow micaz motes

Page 17: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

17ACM SenSys 2007

100 nodes randomly placed in a 100x100 area Communication range of 20 100 simulation runs Accuracy = estimated/correct aggregate

CountTorrent accuracy:Comparison with TAG/Sketches

CountTorrent mean results are accurate and 0 variance Other approaches:

Lose accuracy with high loss rates Have large variance

Page 18: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

18ACM SenSys 2007

Bandwidth usage:Comparison with TAG/Sketches

CountTorrent bandwidth usage increases with loss rate: More packets sent to stabilize the aggregate estimate at nodes

Page 19: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

19ACM SenSys 2007

Adapting to node joins/failures

As nodes join/leave CountTorrent updates nodes’ labels Query aggregate gets updated

100 node network: Nodes join and leave Network size goes from 100 to 500 and back to 100 Each node is running CountTorrent Aggregate = Average of estimates at all live nodes Note: TAG/Sketches estimates do not adapt

dynamically (will not work with changing topology)

Page 20: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

20ACM SenSys 2007

COUNT aggregate in a mobile network

As nodes move CountTorrent repairs hierarchy tree Query aggregate continuously updated

100 node network in a 100x100 grid Nodes move according to RWPB (Random WayPoint

Border) mobility model Aggregate = Average of estimates at all live nodes

Page 21: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

21ACM SenSys 2007

CountTorrent on TOSSIM

50 nodes in a 5x10 grid 20 random nodes fail (at t=25) and come back (at t=50) CountTorrent COUNT aggregate adapts to the changing

topology

Page 22: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

22ACM SenSys 2007

CountTorrent on micaz motes

15 nodes in a 3x5 grid 7 random nodes fail (at t=25) and come back (at t=50) CountTorrent COUNT aggregate adapts to the changing

topology

Page 23: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

23ACM SenSys 2007

Conclusions

We propose CountTorrent Robust: Accurate even in lossy networks Adaptive: Data communication adapts to

changing topology Handles mobility: Close to accurate

aggregates Bandwidth-efficient: adapts to the stability

of the network to maintain accuracy Ubiquitous: All nodes get the aggregate by

design

Page 24: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

24ACM SenSys 2007

Thanks for your patience !

For more informationDNA Research Lab, Columbia University

http://dna-wsl.cs.columbia.edu/

Page 25: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

25ACM SenSys 2007

Extra Slides

Page 26: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

26ACM SenSys 2007

CountTorrent: An adaptive approach

Two major components: Hierarchical data aggregation (divide-and-

rule) Adaptive routing (repair as topology changes)

Adapt to network conditions: Stable networks: accurate tree-based

aggregation Dynamic networks: multi-path aggregation,

accuracy degrades gracefully

Page 27: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

27ACM SenSys 2007

CountTorrent Features

Adapts according to network conditions Good network conditions: Tree-based Very dynamic network: Multi-path

Aggregation decoupled with routing Completely distributed (unsynchronized) Accurate query results in good network

conditions

Page 28: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

28ACM SenSys 2007

Classification of previous approaches

Tree-based vs Multi-path Aggregation via routing vs decoupled from

routing Approximate aggregation vs best-effort Synchronized vs unsynchronized protocols

Page 29: DNA Research Group 1 CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein

29ACM SenSys 2007

java SketchAggSensor/network/SensorNetwork -sketch -sensors 100 -size 100 -random -radius 20 -rounds 100 -linkloss $ll |head -100 >q-$ll