1 similarity aware query processing in sensor networks pingxia, , and alexandroslabrinidis...

18
1 Similarity aware query processing in sensor networks PingXia, PanosK.Chrysanthis, and Alexand rosLabrinidis Proceedings of the 14th International Workshop on Par allel and Distributed Real-Time Systems, April 2006. (W PDRTS'06)

Upload: allan-brent-floyd

Post on 20-Jan-2018

219 views

Category:

Documents


0 download

DESCRIPTION

3 Base station architecture BS

TRANSCRIPT

Page 1: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

1

Similarity aware query processing in sensor

networks

PingXia, PanosK.Chrysanthis, and AlexandrosLabrinidis

Proceedings of the 14th International Workshop on Parallel and Distributed Real-Time Systems, April 2006.

(WPDRTS'06)

Page 2: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

2

Outline• Introduction• Similarity aware query processing

– Query processing scheme– Split a query– Candidate selection

• Simulation• Conclusion

Page 3: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

3

Base station architecture

BSBS

Page 4: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

4

Data Centric Storage (GHT)

(11, 28)

(11,28)=Hash(“temp”)

Get(“temp”)PDA

Put(“temp”)(11,28)=Hash(“temp”)

Page 5: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

5

Motivate

PDA(11, 28)

Q1 : Temp > 200 and 20 < light level < 40 12p.m.-12:30p.m.

Q2 : Temp > 250 and 25 < light level < 3512p.m.-12:30p.m.

Some queries are similar

The basic idea

The results (events) for previously issued queries as materialized views

Utilized the materialized view to answer similar queries

PDA

Page 6: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

6

System model

(36, 40)

Use a hash function to determine the index node

O-nodeID attributes (range) timestamp

10 temp 12p.m.

Index entry

M-nodeID attributes (range) timestamp

2 100-200 12:30p.m.

M-view directory entry

Mobile agent

Location

Index node--I-node

Original storage node--O-node

Materialized view node--M-node

Page 7: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

7

Query Processing scheme

(36, 40)

52

20

15

9

10

O-nodeID attributes timestamp

10 temp 12p.m.

15 temp 12:30p.m.

20 temp 12:30p.m.

Index entry

M-nodeID attributes timestamp

5 25-35 12:00p.m.-12:10p.m.

9 100-250 12:00p.m.-12:30p.m.

2 100-200 12:15p.m.-12:30p.m.

M-view directory entry

Mobile agent

Location

Index node--I-node

Original storage node--O-node

Materialized views node--M-node

Event : fireRange: 100-200Time: 12:00p.m.-12:30p.m.

Candidates of O-node : 15, 20Candidates of M-view-node : 9, 2

Selecting a set of nodes as responders

Page 8: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

8

Split a query• Expect to find an M-view entry

– Answer the query completely• In most case the range of an M-view entry

– Partially overly• Split the original query

– Avoid duplicatesQuery rangeQuery range 2020 4040

M-view entry 1M-view entry 1 1515 3030

M-view entry 2M-view entry 2 2525 4040

Page 9: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

9

Split a query1. [a, b] contains [x, y]

Query rangeQuery rangea b

The range of an The range of an M-view entryM-view entry

x yQ1: on range [x, y]

Q2: on range [a, x] v [b, y]

2. [x, y] contains [a, b]

Query rangeQuery rangea b

The range of an The range of an M-view entryM-view entry

x yNeedn’t to split the query

3. [a, b] intersection [x, y]

Query rangeQuery rangea b

The range of an The range of an M-view entryM-view entry

x y

Q1: on range [a, y]

Q2: on range [y, b]

Page 10: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

10

Candidate selectionO-nodeID attributes timestamp

10 temp 12p.m.

O-nodeID attributes timestamp

1 temp 12: 03p.m.

10 temp 12p.m.

O-node candidate setO-node candidate set

M-nodeID attributes timestamp

2 200-240 12:30p.m.

5 100-200 12:30p.m.

24 150-250 12:00p.m.

M-node candidate setM-node candidate set

orderorderDistance

5 → 2 → 24close far

high lowPriority

Select this M-node to be a responder

M-nodeID attributes timestamp

2 200-240 12:30p.m.

24 150-250 12:00p.m.

Event : fireRange: 100-250Time: 12:00p.m.-12:30p.m.

Page 11: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

11

Candidate selectionO-nodeID attributes timestamp

10 temp 12p.m.

O-node candidate setO-node candidate set

M-node candidate setM-node candidate set

orderorderDistance

5 → 2 → 24close far

high lowPriority

Select this M-node to be a responder

M-nodeID attributes timestamp

2 200-240 12:30p.m.

24 150-250 12:00p.m.

RespondersResponders1. Selected M-nodes (5, 2)

2. Remaining O-node candidates

(10)

CompareCompare1. Cost with M-view

2. Cost without M-view

resultresult

Event : fireRange: 100-250Time: 12:00p.m.-12:30p.m.

Page 12: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

12

Candidate selectionnodeID cost

N1 C1

N2 C2

N3 C3

: :Nn Cn

responder setresponder set

CostCost1. The sum of the energy cost of forwarding

the query to the node

2. The energy cost of returning the results back to Q-node

MinimizeMinimizeTotal_costTotal_cost = x1 * C1 + x2 * C2 + ... + xn * Cn

where x1, x2,…,xn represent the percentage of the range in a M-view answer a query

Page 13: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

13

Simulation• Esend = Etrans × k + Eamp × d2

– Etrans : Transmitter electronics– 50nJ/bit– Eamp : Transmit amplifier– 0.1nJ/bit/m2

• Ereceive = Erec × k– Erec : Receiver electronics– 50nJ/bit

• Sensing region : 400m × 400m• Num of sensor : 400• Num of events : 100• Num of queries : 100• Event size : 8bytes• Range size : 4bytes• Index size : 4bytes• Skewness of zipf distribution : 0.5

Page 14: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

14

Simulation– Event size

Page 15: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

15

Simulation– Query skewness

Page 16: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

16

Simulation– Total queries

Page 17: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

17

Simulation– Total event

Page 18: 1 Similarity aware query processing in sensor networks PingXia, , and AlexandrosLabrinidis Proceedings…

18

Conclusion• Propose a similarity-aware query

processing scheme – Creates materialized views– To answer future queries that are similar to

past ones– Reduces energy consumption