Query Processing over a sensor network
Download
Report
Transcript Query Processing over a sensor network
Query Processing
over a Sensor Network
Cornell University
Johannes Gehrke
Philippe Bonnet
Overview
Frontend
Database
Server
Sensor.com WINS NG Architecture
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?
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?
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?
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?
Data Model
• Abstract Data Type (ADT) : class of devices and their
methods
ex: Infrared Detector : IR
IR.detectTrackedVehicle()
IR.signature()
IR.latitude()
IR.powerStatus()
IR.detectPersonel()
IR.longitude()
IR.TurnDown()
IR.TurnOn()
ex: Camera
Camera.orientateTowards(int X, int Y)
Camera.latitude()
Camera.longitude()
• Relation : collection of objects of the same class
Declarative Queries
Monitoring Queries
SELECT R.IR.latitude(), R.IR.longitude()
FROM InfraRedDetectors R
WHERE R.IR.detectTrackedVehicle();
SELECT
FROM
WHERE
AND
AND
R.IR
InfraRedDetectors R, Positions P
$near(R.IR.latitude(), R.IR.longitude(), P.latitude, P.longitude)
P.name = “Marina Del Rey Hotel”
R.IR.detectPersonel();
Declarative Queries
Control Queries
SELECT R.IR.turnDown()
FROM InfraRedDetectors R
WHERE R.IR.latitude() < 100;
SELECT C.Camera.orientateTowards(X,Y)
FROM Camera C, InfraredDetectors R
WHERE $near(R.IR.latitude(), R.IR.longitude(),
C.Camera.latitude(), C.Camera.longitude())
AND R.IR.detectTrackedVehicle();
Architecture
Sensor Network
Graphical
User Interface
SQL
query
Proxy
Server
Proxy
Predator
Proxy
Server
• Proxy on each node
• Proxy Server needs to address groups of proxies:
• at least by class of device
• possibly more expressive predicates
Proxy
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)
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
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.