Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th,...

41
Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th , 2011 1
  • date post

    22-Dec-2015
  • Category

    Documents

  • view

    215
  • download

    0

Transcript of Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th,...

Page 1: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

1

Range Queries in Distributed Networks

Jie GaoStony Brook University

Dagstuhl Seminar, March 14th, 2011

Page 2: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

2

Target Tracking with Sensor Networks

Page 3: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

3

Target Queries• Range queries: # targets within

any geographic range R.

• Tracking queries: Find the yellow

car.• Closest target

queries

Page 4: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

4

Range Queries in Centralized Settings

• Orthogonal range queries.– K-d tree: O(n) storage, query cost O(√n) – Range tree: O(nlogn) storage, query cost O(logn)

Range tree on x-coordinates

Range tree on y-corodinates

Page 5: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

5

Range Queries in Distributed Settings

• Sensors report targets to a central station.– Bottleneck and

single point of failure.

Page 6: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

6

Distributed Hash Tables

• Sensors report targets to a random hash node.– Data is spread

out.– Update and

query cost are high if the hash node is far away.

Page 7: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

7

Range Queries in Distributed Settings

• Flood the region R, count # of targets.– Update cost ~

target movement distance.

– Query cost ~ Area of R.

Page 8: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

8

Lower Bound on Query v.s. Storage in Distributed Setting

• Storage per node: m ≈ logn.• A range with area A.• Total number of possible assignments of

values in the range: 2A. • Query cost: Ω(√A/m)

Page 9: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

9

Our Solution

• Use differential forms for tracking and answering range queries of mobile targets.– Decentralized.– Update cost ~ target movement distance– Query cost ~ Perimeter of R– Robust to node failures, link dynamics, mobility,

coverage holes, sensing errors, location inaccuracies.

Page 10: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

Using Range Queries for Target TrackingFind the yellow car?

1. Exponentially expand the range– Stops when the

range contains the target

2. Recurse & refine• Total cost =O(d)• Distance sensitive

queries10

d

1+2+4+8+…+d/2+d < 2d

Page 11: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

11

Outline

• Differential 1-form• Algorithms for computing 1-form• Network complications: – Dynamics: node/edge failures– Sensing errors– Network coverage holes

• Simulations and comparisons

Page 12: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

12

Definition: Differential 1-Form

• Planar graph G: a target stays within a face.• Maintain “directed” weights f on edges.

• For each face, summing up weights clockwise gives the total weights of targets inside:

1/3 1/3

1/3

1.5 0.5

0

2 -1

-1

f(e)= wf(-e)= -w

Page 13: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

Boundary Operator

• A boundary operator applies on a face and returns the sum of the boundary edges in clockwise directions.

• Extend f to a face.

13

1/3 1/3

1/3∂[ ]= 1/3 1/3

1/3

1/3 1/3

1/3f[ ]= f[∂ 1/3 1/3

1/3

1/3 1/3

1/3]= f[ ]=1

Page 14: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

14

Boundary Operator

• Boundary operator on a union of faces.

∂[ ]= ∂[ ]+∂[ ]= a b

c

+-b

=

d

e

a

c

d

e

Page 15: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

15

Differential 1-Form for Range Queries

• The total weights of targets inside a region R is the sum of edge weights of ∂R.– R is simply a collection of faces, possibly

disconnected.• Range query: walk along ∂R in clockwise order

and sum up edge weights.

Page 16: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

16

Update 1-Form When Targets Move

• If a target crosses an edge e, subtract target weight from f(e).

0.3

0

0.35

0.350.7

-0.7 0.3

0

0.35

0.35-0.3

0.3

Page 17: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

17

Communication Cost

• Assuming sensors have constant density.

• Update cost = # edges crossed = O(distance moved)

• Query cost = # edges on ∂R = O(perimeter of R)

Page 18: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

18

Extract a Planar Graph

• Extract a planar graph from connectivity graph– Location-based schemes

e.g., [Gao, et al, 01] [Sarkar et al, 09]– Location-free schemes

e.g., [Funke, Milosavljevic 07] [Zhang et. al, 08]

• Virtual planar graph– Only requirement: tell whether a target is within a

face or not.

Page 19: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

19

Initializing Differential 1-Form

• New targets coming into the network– Simply update f when a target comes in.

• For existing targets:– Imagine the target enters from the face of infinity

along any path.

w

w

w

Page 20: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

20

Multiple Targets: Sweep the Network

• Find a spanning tree T’ of the dual graph G’, rooted at the face of infinity.

• Aggregate the weight of edges on T’.• Weight of an edge in the primal = weight of the dual edge.• Total communication cost for initialization =O(n)

Page 21: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

21

Robustness to Link or Node Failures

• A link failure or node failure in the interior or exterior of R does not affect the query result.

Page 22: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

22

Robustness to Node Insertion

• Node insertion: refine the current face and give proper weights to the new edges.

• The weight of existing edges are not affected.

Page 23: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

23

Robustness to Coverage Holes

• A target can be lost in the hole but range query results of a region enclosing or disjoint of the hole are not affected.

Page 24: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

24

Robustness to Sensing Errors or Location Inaccuracies

• We are unsure of the precise target location but know the target is within a range.

• Any range query fully enclosing or disjoint with the target “feasible location” region gives correct results.

Page 25: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

25

Tracking with Mobile Sensors

• Sensors can move.– Maintain the planar graph.

e.g., [Karp Kung 2001] [Gao, et al, 01] – When a target crosses an edge, update the 1-

form.

Page 26: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

26

Outline

• Differential 1-form• Algorithms for initializing 1-form• Network complications: – Dynamics: node/edge failures– Sensing inaccuracies– Network holes

• Simulations and comparisons– Compare with location services– Robustness to link failures and sensing errors

Page 27: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

27

Comparison with Location Services

• LLS [Abraham etal 2004]– Track a mobile target– Distributed hash table with hierarchical partitions

Tracked by one (hashed) location server at each square containing it at each level.

Query goes to the (hashed) location server at each square containing the query node.

Query cost : O(d)

d

Page 28: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

28

Location Services

• LLS: lazy updates– A target does not trigger updates unless it moves

outside the 9 squares.– The cost is O(d’).– The distance travelled is Ω(d’). – Do this for each level

• Total update cost: O(d’logd’) amortized, where d’ is the movement distance.

d’

Page 29: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

29

Differential Forms v.s. LLSDifferential form• Designed for range

queries• Use recursive search

for tracking query

LLS• Designed for tracking

query• Use recursive search

for range query --- query maximum quads within R.

Page 30: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

30

Simulations: Differential Forms v.s. LLS

• Range query costDifferential forms << LLS

• Query individual targetsDifferential forms ~ 2 · LLS

• Update costDifferential forms << LLS

O(d) v.s. O(d log d)

Page 31: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

31

Summary

• Computational geometry carried to the distributed setting.

• Questions and comments?

• Jie Gao, Leonidas J. Guibas, John Hershberger, Li Zhang, Fractionally Cascaded Information in a Sensor Network, IPSN’04.

• Rik Sarkar, Jie Gao, Differential Forms for Target Tracking and Aggregate Queries in Distributed Networks, Mobicom’10.

Page 32: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

32

Multiple Targets

• Counting range query only– Maintain a single 1-form for all targets

• Queries for identifiable targets– Maintain a 1-form for each target.

• Maintain 1-form for each identifiable family of targets.– E.g., all cabs, all police cars, etc.– # cabs in the neighborhood, find a nearby cab

Page 33: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

33

Ranges Cutting Through Holesor, geometric ranges not following graph edges

• Take the best inner and outer approximation.• Refine with detailed info from sensors near

boundary

Page 34: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

34

Range Query of Continuous Data Fields

• Sensors monitor a temperature field.• Treat each sensor reading as a target with

certain weight.• Apply the same scheme.

Page 35: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

35

Update Costs

• The target moves one unit randomly per time unit --- discrete Brownian motion.

• LLS cost is amortized, some moves are expensive.

Average costs Max costs

Page 36: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

36

Range Queries Costs

• Ranges: random rectangles• Caveats: for LLS we use the same hierarchy for

all targets --- which saves query cost.

Average costs Max costs

Page 37: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

37

Tracking Query Costs

• Query for individual targets• The expanding and refinement steps makes

differential forms more costly.

Average costs Max costs

Page 38: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

38

Target Detection Errors

• Fail to detect a target crossing an edge– Prob p: failure rate

• Target location error– LR: max distance of estimated loc from true loc

• Ranges: random axis-parallel rectangles• Relative error = error in counts/ # targets

Page 39: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

39

Robustness to Crossing Errors

Page 40: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

40

Robustness to Sensor Location Errors

• Overcounting and undercounting cancel out.

Page 41: Range Queries in Distributed Networks Jie Gao Stony Brook University Dagstuhl Seminar, March 14 th, 2011 1.

41

Summary

• Differential form is a topological notion.– “Location-free” method

• Robust to network changes and sensing errors• Sub-sampling sensors to conserve power by

allowing gracefully degradation of query results.