Presentation is loading. Please wait.

Presentation is loading. Please wait.

Aggregate Query Processing in Ad-Hoc Sensor Networks Yong Yao Database lunch, Apr. 15th.

Similar presentations


Presentation on theme: "Aggregate Query Processing in Ad-Hoc Sensor Networks Yong Yao Database lunch, Apr. 15th."— Presentation transcript:

1 Aggregate Query Processing in Ad-Hoc Sensor Networks Yong Yao Database lunch, Apr. 15th

2 Outline l Motivating Example l Sensor and Sensor Network l Query Model l In-Network Aggregates l Routing and Aggregation l Summary

3 Motivating Example l A several-hundred node ad-hoc network of sensors(Cougar) is deployed in Rhodes Hall and Upson Hall l The network is shared by all occupants l The network is dynamic, and people can add and remove sensors, and sensors frequently run out of power or crash

4 Motivating Example l People extract information from the environment by querying the network l What is the temperature of my office? l How many people are in the system lab? l What’s the quietest conference room? l Where is Johannes?

5 Next generation sensors l Data source: Sensors respond to physical stimulus (heat, light, or a motion) and produce events l Computation Ability: Sensors are active, full fledged computers l Communication Ability: Wireless connected, broadcast channel, self organized into a multi- hop network topology. l Limitation: Energy constrained and easy to crash.

6 Today’s Hardware - Motes l Assembled from off-the-shelf components l 4Mhz, 8bit MCU (ATMEL) l 512 bytes RAM, 8K ROM l 900Mhz Radio (RF Monolithics) l 10-100 ft. range l Temperature Sensor & Light Sensor l LED outputs l Serial Port 1.5” x 1.5”

7 Sensor Network l Consist of a bunch of sensors, and gateway nodes(sinks). l As an ad-hoc network l Static or quasi-static l Dynamically changing l Large scale l As a distributed database system with in-network query processing

8 Query Model SELECT {agg(attr),attrs} FROM sensors WHERE {spatial constraint} GROUP BY {attrs} HAVING {havingPreds} DURATION {time} EVERY {period} l Example: What is the temperature of my office l Select AVG(temperature) From TemperatureSensor s Where s in MY_OFFICE Duration 1h Every 10s Open Problem: What’s the best model of general queries.

9 Aggregate Operator l Agg is implemented via three functions l Merging function f : l =f(, ) l and are multi-valued partial state records. For avg, it is a two-tuple l Initializer i to specify how to instantiate a state record for a single sensor value l Evaluator e takes a partial state record and computes the actual value of the aggregate l AVG: l f (, )= l i (x)= l e ( )=S/C

10 Aggregate operator classification MAX,MINCOUNT, SUM AVERAGEMEDIANCOUNT DISTINCT Partial StateDistributive AlgebraicHolisticUnique Duplicate Sensitive NoYes No Exemplary(E),Summary(S) ESSES MonotonicYes No Yes

11 In-Network Aggregation l Traditional Sensor Network (Fjord Architecture) l Centralized server-based approach: All data are sent back to the server. Sensors do not notice the content of user queries. l Example: l What’s the temperature of my office? l Tuple: l Problems: l Not scalable l Energy inefficient l Improvement l Install a filter on each sensor

12 In-Network Aggregation l =f(, ) l Computation Plan: How to divide sensors into partitions l Communication Plan: How to determine next hop. l Key Problem: Match computation plan to communication plan. l Example: What’s the temperature of the fourth floor in the Upson Hall? l Plan: Compute the temperature of each office first, and then compute the final result.

13 In Network Aggregation l Two algorithms l Cluster based algorithm l Divide and conquer: Divide the whole query region into smaller clusters, and execute the query in each cluster. Repeat the process until cluster size is small enough.

14 In-Network Aggregation l Cluster based algorithm l Sensors close geographically are usually close in hops l The assumption is not always true l Cluster leader election and maintenance

15 In Network Aggregation l Tree based Algorithm l Create a Spanning Tree over the query region l Aggregate children data at the parent node

16 In Network Aggregation l Pipelined Aggregation (TAG) l Two phases: l Flooding phase: the routing tree is built and aggregate queries are pushed down into sensor networks l Aggregate phase: the aggregate values are continually routed up from children to parents l Epoch: the smallest time unit. Must bigger than the transition time of a packet

17 In Network Aggregation l An Example

18 In-Network Aggregation l Problems on the pipelined approach l Epoch=? l Delay=Epoch * Depth of the tree l Interval=Epoch l Fault tolerance l Each link and node is a single failure point l If a link close to the root is down, then … l If the query region only occupies a small part of the network, it is wasteful to create and maintain a global spanning tree

19 In-Network Aggregation l Solution: l Local repair: Find a new route to the tree l Do aggregation when all data from children are received. l Requirements: l Monitor the network continuously l Fast react to network topology changes

20 In-Network Aggregation l Go deep into the protocol stack l Sensor network is task specific Application Layer Routing Layer Link Layer Mac Layer

21 Routing and Aggregation l A bunch of existing ad-hoc routing algorithms: AODV, DSDV, DSR, ZRP, Directed Diffusion, etc. l Classified into two main categories: l Table Driven: DSDV, WRP l Source-initiated On-Demand Driven: AODV, DSR, TORA, SSR l Two main tasks: l Route discovery l Route maintenance

22 Routing and Aggregation l Can we use any existing ad-hoc routing protocol directly? l Centralized algorithm and Cluster algorithm l Tree based algorithm l Different communication pattern l Ad-hoc network: Randomly selected source and destination pair l Sensor network: Query dissemination, data collection l Predictable traffic workload

23 Routing and Aggregation l New Routing Algorithm l Route Discovery: Similar to Table Driven algorithm, the route information propagates from the destination to the source l Route Maintenance: Similar to Source-initiated On- Demand Driven, support local repair and cooperative repair. Periodically recreates all routes. l New Interface l Send (Packet* p) l Receive (Packet* p) l Filter (Packet* p)

24 Ongoing Research l Query language and data model l High level query processing algorithm l Low level routing algorithm l Multiple query optimization l Heterogeneous sensor network l Approximate query processing

25 Summary l Sensor network is a large scale distributed database system. Each sensor is an independent data source l Cluster vs. Tree based algorithm l Performance l Fault tolerance l Applications l How many people are in the system lab? l Interaction between in-network query processing and routing


Download ppt "Aggregate Query Processing in Ad-Hoc Sensor Networks Yong Yao Database lunch, Apr. 15th."

Similar presentations


Ads by Google