22
CountTorrent: Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks Abhinav Kamra, Vishal Misra and Dan Rubenstein - Columbia University (ACM SenSys 2007) Presenter : Justin

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

  • Upload
    skyla

  • View
    37

  • Download
    0

Embed Size (px)

DESCRIPTION

CountTorrent : Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks. Abhinav Kamra , Vishal Misra and Dan Rubenstein - Columbia University (ACM SenSys 2007) Presenter : Justin. A few definitions. Distributive queries (e.g. MIN, MAX, COUNT, SUM) - PowerPoint PPT Presentation

Citation preview

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

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

Abhinav Kamra, Vishal Misra and Dan Rubenstein - Columbia University(ACM SenSys 2007)

Presenter : Justin

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

2

A few definitions

Distributive queries (e.g. MIN, MAX, COUNT, SUM) Form: f(p U q) = f( f(p), f(q) ), (p, q = set of

disjoint nodes) e.g. Sum: f(p U q) = |p| + |q|

6

3

4

5

1

2

9

1011

21

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

3

A few definitions (cont.) Two types of queries:

Duplicate-sensitive: e.g. SUM, COUNT Duplicate-insensitive: e.g. MIN, MAX

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

4

Traditional data aggregation Goal: Combine data values while routing to

the sink Two schemes

Tree-based Multi-path

example

Tree-based(spanning tree)

Multi-path(DAG)

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

5

Traditional data aggregation (cont.)

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

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

6

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 7: CountTorrent :  Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks

7

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

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

8

CountTorrent: Label assignment Each node is assigned a unique (binary) label

by its parent. When a new node joins:

Chooses one of its neighbors as parent Parent splits its label S into 2 separate labels S0

and S1: Child given label S1

h2

h3

h10

10

11

h4h2

h3

h10

10

11

Node h4 joinsChooses h1 as parent

0100

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

9

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

All labels can be merged to form ε

3

5

4

1

00

100

101

11

010

011

6

2

6

400 11

9

2

01

10

11

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

10

CountTorrent: Data combining Aggregating with tuples

Definition: Tuple = (binary label, aggregate value) pair

Labels differ only in last bit merge tuples

(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)

Node A Node B

Neighbors exchange tuples randomly

Merge any tuples if possible

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

11

CountTorrent: Variants Static CountTorrent

Exchange tuples with neighbors Dynamic CountTorrent

Addiction tuple cache contains tuples associated with the node’s children and its own label.

b

c

a(10,4)

(1100,2) (1100,2)(111,3)

(1101,1)

(111,3)……

d

(10,4)

(1100,2)

(1101,1)(111,3)

(10,4)(1100,0)

c

a

(111,3)……

d

(10,4)

(1101,1)(111,3)

Send up

node b leaves

node a reset value of

“1100” into 0

node d require new label from a

c

a(10,4)(11,3)

(11,3)……

d

(10,4)

(1101,1)(11,3)

Update down

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

12

CountTorrent: Fine-tuning 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 13: CountTorrent :  Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks

13

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)(0010, 2) (10, 3)(001, 2)Node A Node B

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

(1, 8)(001, 2)

Node a won’t send (11,5) again

(11, 5)(01, 3)(0010, 2)

Node a won’t send (0010,2) to node b, since “001” is the prefix of “0010”

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

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

14

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 15: CountTorrent :  Ubiquitous Access to Query Aggregates in Dynamic and Mobile Sensor Networks

15

Simulations & Experiments Simulations:

Compare with other aggregation methods

Effect of Node joins & failures Aggregation in a mobile network

Experiments on Tossim & motes: CountTorrent implementation on

Crossbow micaz motes

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

16

CountTorrent accuracy

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

17

Bandwidth usage

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

18

Adapting to node joins & failures

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

19

COUNT aggregate in a mobile network

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

20

CountTorrent on TOSSIM

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

21

CountTorrent on micaz motes

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

22

Conclusions 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