multi-dimensional range query in sensor networks xin li,young jim kim, ramesh govindan (university...

28
Multi-dimensional Range Multi-dimensional Range Query Query in Sensor Networks in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) (University of Southern California ) Wei Hong (Intel Research Lab at Berkele Wei Hong (Intel Research Lab at Berkele y) y) SenSys '03 SenSys '03

Post on 20-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

Multi-dimensional Range Query Multi-dimensional Range Query in Sensor Networksin Sensor Networks

Xin Li,Young Jim Kim, Ramesh Govindan Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California )(University of Southern California )

Wei Hong (Intel Research Lab at Berkeley)Wei Hong (Intel Research Lab at Berkeley)SenSys '03 SenSys '03

Page 2: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

AbstractAbstract

►Multi-dimension range queryMulti-dimension range query►eventevent (data) (data) ►attributeattribute -- scalar value -- scalar value►correlating eventcorrelating event►List all events whose temperature lies

between 50. and 60., and whose light levels lie between 10 and 15.

►Point queryPoint query

Page 3: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

AbstractAbstract

►Distributed Index for Multi-dimension Distributed Index for Multi-dimension datadata

((DIMDIM))►Built upon geographic routing Built upon geographic routing

algorithm algorithm GPSRGPSR (Greedy Perimeter (Greedy Perimeter Stateless RoutingStateless Routing

►Event insertion and query costEvent insertion and query cost

Page 4: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

OutlineOutline

► IntroductionIntroduction►Related WorkRelated Work►The Design of DIMThe Design of DIM►AnalysisAnalysis►Simulation ResultSimulation Result►ConclusionConclusion

Page 5: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

IntroductionIntroduction

►Use multi-dimension range query on Use multi-dimension range query on attributes to query for event of attributes to query for event of interest interest

►Analyzing the growth of marine micro-Analyzing the growth of marine micro-organismsorganisms

►Used by application, for correlating Used by application, for correlating event and trigger actionevent and trigger action

ex: Habit monitor applicationex: Habit monitor application

Page 6: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

Introduction (cont.)Introduction (cont.)

►Pre-computed indexPre-computed index►Centralized indexCentralized index► In-network distributed data structure In-network distributed data structure

forfor efficiently answering multi-efficiently answering multi-

dimensional range queries.dimensional range queries.► in-network data storage in-network data storage ► locality-preserving geographic hashlocality-preserving geographic hash (this paper focus here)(this paper focus here)

Page 7: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

The Design of DIMThe Design of DIM

►Nodes generate EventsNodes generate Events►Event: <AEvent: <A11,A,A22,,……,A,Akk>>►Multi-dimension range query:Multi-dimension range query: <x<x11-y-y1, 1, xx22-y-y2,2,

…..….., , xxkk-y-yk k >>

►Goal: Efficiently answer such queriesGoal: Efficiently answer such queries►DIM function:DIM function: 1. Locality-preserving geographic hash1. Locality-preserving geographic hash 2. Underlying geographic routing scheme2. Underlying geographic routing scheme

Page 8: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

The Design of DIMThe Design of DIM

►GPSR algorithmGPSR algorithm►ZonesZones►Associating Zones with NodesAssociating Zones with Nodes► Inserting an EventInserting an Event►Resolving and Routing QueriesResolving and Routing Queries►RobustnessRobustness

Page 9: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

GPSRGPSR

►Enable the delivery to a node at a Enable the delivery to a node at a specified locationspecified location

►Routing : greedy-mode forwardingRouting : greedy-mode forwarding►Perimeter mode traversalPerimeter mode traversal

-using right hand rule-using right hand rule

Page 10: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

ZonesZones

► Locality-preserving geographic hashLocality-preserving geographic hash k-d multi-attribute event -> 2-d geographic k-d multi-attribute event -> 2-d geographic

zonezone► Each node owns a zone (part of attribute Each node owns a zone (part of attribute

space)space) events falling into that space are routed to and events falling into that space are routed to and

store at that node.store at that node.► Rectangle R, sub-rectangle Z Rectangle R, sub-rectangle Z ► code(Z) : Zone code code(Z) : Zone code ► Sibling zoneSibling zone► Backup zoneBackup zone

Page 11: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

Zones (cont.)Zones (cont.)

Page 12: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

Zones (cont.)Zones (cont.)

Page 13: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

Associating Zones with NodesAssociating Zones with Nodes

► Each zone assigned to a single node Each zone assigned to a single node (ownership)(ownership)

►Different size zoneDifferent size zone► Empty zone owner = its backup zone ownerEmpty zone owner = its backup zone owner► Undecided boundaryUndecided boundary

-- -- Data drivenData driven. Later resolved by GPSR’s . Later resolved by GPSR’s perimeter perimeter

traversal when an event is inserted or a query traversal when an event is inserted or a query sentsent

Page 14: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

Inserting an EventInserting an Event

►Hashing an event to a zoneHashing an event to a zone► Routing an event to its ownerRouting an event to its owner► Resolving undecided zone boundaries during Resolving undecided zone boundaries during

insertion -- Event-driven zone shrinkinginsertion -- Event-driven zone shrinking

Page 15: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab
Page 16: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab
Page 17: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

Resolving and Routing QueriesResolving and Routing Queries

►Minimum sub-tree contain entire range Minimum sub-tree contain entire range queryquery

► Compute the prefix of zone code of all zones Compute the prefix of zone code of all zones in the sub-treein the sub-tree

► Split into sub-queries recursivelySplit into sub-queries recursively

Page 18: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

RobustnessRobustness► Maintaining zonesMaintaining zones 1. new node join1. new node join 2. turn a node off 2. turn a node off --backup zone will take over its zone--backup zone will take over its zone --zone expansion sib ling zone--zone expansion sib ling zone 3. node failure 3. node failure ► Preventing data loss from node failurePreventing data loss from node failure 1. Local replication 2. Mirror replication1. Local replication 2. Mirror replication► Robustness to packet lossRobustness to packet loss -- simple ACK scheme-- simple ACK scheme

Page 19: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

DIM: AnalysisDIM: Analysis

►Performance metrics:Performance metrics: -- Average insertion cost-- Average insertion cost

-- Average query delivery cost-- Average query delivery cost

►Distribution of query range sizeDistribution of query range size

-- uniform distribution-- uniform distribution

-- bounded uniform distribution-- bounded uniform distribution

-- algebraic distribution-- algebraic distribution

-- exponential distribution-- exponential distribution

Page 20: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

DIM: Analysis (cont.)DIM: Analysis (cont.)► Alternative choices:Alternative choices:1.external storage1.external storage2.store event at the node where they are2.store event at the node where they are generate .Queries are flooded.generate .Queries are flooded.3.Geographic Hash Table for Range queries3.Geographic Hash Table for Range queries (GHT-R)(GHT-R)

insertion insertion costcost

query cost query cost

O(O(√√n)n) zerozerozerozero O(n)O(n)

O(O(√√n)n) O(rO(r√√n)n)

Page 21: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

DIM: Simulation ResultDIM: Simulation Result

Page 22: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

DIM: Simulation Result (cont.)DIM: Simulation Result (cont.)

Page 23: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

DIM: Simulation Result (cont.)DIM: Simulation Result (cont.)

Page 24: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

DIM: Simulation Result (cont.)DIM: Simulation Result (cont.)

Page 25: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

DIM: Simulation Result (cont.)DIM: Simulation Result (cont.)

Page 26: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

ImplementationImplementation

Page 27: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

ConclusionConclusion

►Distributed indexDistributed index►exact match query v.s Range queryexact match query v.s Range query►Single attribute v.s Multi attribute Single attribute v.s Multi attribute ►Query can be issued from any nodeQuery can be issued from any node►DIM outperform GHT-RDIM outperform GHT-R

Page 28: Multi-dimensional Range Query in Sensor Networks Xin Li,Young Jim Kim, Ramesh Govindan (University of Southern California ) Wei Hong (Intel Research Lab

Future workFuture work

►Adaptation to skewed data distributionAdaptation to skewed data distribution►Node Heterogeneity Node Heterogeneity ►Efficient resolution of existential queryEfficient resolution of existential query

►Port DIM to Mica mote and integrate them Port DIM to Mica mote and integrate them into TinyDBinto TinyDB