Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

13
Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet

Transcript of Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

Page 1: Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

Query Processing over a Sensor Network

Cornell University

Johannes Gehrke

Philippe Bonnet

Page 2: Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

DatabaseServer

Frontend

Overview

Sensor.com WINS NG Architecture

Page 3: Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

Problems

• Data Model: How to represent devices in a uniform way so that queries can be asked to access them?

• Architecture: How to connect the database server and the devices?

• Query Execution: Can the traditional query execution techniques be applied in a device database system?

• Query Optimization: Are traditional cost based optimizer well suited for device database systems?

Page 4: Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

Problems

• Data Model: How to represent devices in a uniform way so that queries can be asked to access them?

• Architecture: How to connect the database server and the devices?

• Query Execution: Can the traditional query execution techniques be applied in a device database system?

• Query Optimization: Are traditional cost based optimizer well suited for device database systems?

Page 5: Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

Problems

• Data Model: How to represent devices in a uniform way so that queries can be asked to access them?

• Architecture: How to connect the database server and the devices?

• Query Execution: Can the traditional query execution techniques be applied in a device database system?

• Query Optimization: Are traditional cost based optimizer well suited for device database systems?

Page 6: Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

Problems

• Data Model: How to represent devices in a uniform way so that queries can be asked to access them?

• Architecture: How to connect the database server and the devices?

• Query Execution: Can the traditional query execution techniques be applied in a device database system?

• Query Optimization: Are traditional cost based optimizer well suited for device database systems?

Page 7: Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

Data Model

• Abstract Data Type (ADT) : class of devices and their methodsex: Infrared Detector : IR

IR.detectTrackedVehicle() IR.detectPersonel()

IR.signature()

IR.latitude() IR.longitude()

IR.powerStatus() IR.TurnDown() IR.TurnOn()

ex: Camera

Camera.orientateTowards(int X, int Y) Camera.latitude() Camera.longitude()

• Relation : collection of objects of the same class

Page 8: Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

Monitoring Queries

SELECT R.IR.latitude(), R.IR.longitude()FROM InfraRedDetectors RWHERE R.IR.detectTrackedVehicle();

SELECT R.IR FROM InfraRedDetectors R, Positions PWHERE $near(R.IR.latitude(), R.IR.longitude(), P.latitude, P.longitude) AND P.name = “Marina Del Rey Hotel” AND R.IR.detectPersonel();

Declarative Queries

Page 9: Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

Declarative Queries

Control Queries

SELECT R.IR.turnDown()FROM InfraRedDetectors RWHERE R.IR.latitude() < 100;

SELECT C.Camera.orientateTowards(X,Y)FROM Camera C, InfraredDetectors RWHERE $near(R.IR.latitude(), R.IR.longitude(),

C.Camera.latitude(), C.Camera.longitude()) AND R.IR.detectTrackedVehicle();

Page 10: Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

Architecture

Predator

ProxyServer

Proxy

SQLquery

Graphical User Interface

Sensor Network

• Proxy on each node• Proxy Server needs to address groups of proxies:

• at least by class of device• possibly more expressive predicates

ProxyServer

Proxy

Page 11: Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

Query Execution

• Step 1 – Query Processing on the database server

(Database Server currently implemented

Proxies on Windows CE devices - 01/2000)– Performance Evaluation

• Step 2– Distribution of Query Fragments to the proxy servers

and proxies

(01/2001)

Page 12: Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

Query Optimization

• Relies on meta-information describing the sensor network:– categories of devices, methods supported on each

device, statistics concerning the usage of devices, distribution criterion, ...

• Initial Optimizer: 01/2000• Server-based Optimizer: 09/2000• Distributed Optimizer:09/2001

Page 13: Query Processing over a Sensor Network Cornell University Johannes Gehrke Philippe Bonnet.

Conclusion

• Today– Prototype based on Predator

data model, architecture (proxy servers and proxies in Java), query execution, draft query optimization.

• Period 2:– Proxies on Win CE+WINS NG– Server-based Optimizer.