The Cougar Approach to
In-Network Query Processing
in Sensor Networks
Presented By:
Supervised By:

Dilini A. Muthumala
Dr. Jeevani Goonetillake
Authors
Yong Yao
• Software Engineer at Google
• Ph.D., Computer Science
Cornell University (2000 – 2007)

• Research Interests
– Databases
– Sensor Networks
– Distributed Systems
Johannes Gehrke
• University Professor
Department of Computer Science
Cornell University

• Research Interests
–Scalability in Computer Games and Simulations
–Data Privacy
–Data Mining
Motivation
• “Database Abstraction Layer” for Sensor
Networks
• Most popular sensor data management
middleware
• Introduces Database Abstraction Layer Concept
• Cited by 1185 (source: Google Scholar)
No. of citations

Year
Presentation Outline
• Introduction
• Database Abstraction Layer
• Architecture
• Research Problems
• Conclusion
Introduction
Wireless Sensor Network (WSN)
Limitations
• Communication
• Power Consumption
• Computation
• Uncertainty in Sensor Readings
WSN Applications
• Smart Buildings, Smart Homes
WSN Applications
• Wild Life Monitoring
WSN Applications
• Monitoring Vineyards
Future of WSN
Is Johannes
in his
office?

Internet
Future of WSN
Humidity

Temperature

Light
Motivation
1) Declarative queries are suited for WSN
interaction
SELECT Temp
FROM sensors

Complex Network
Motivation
2) Increasing network lifetime is the major
goal of any WSN application

WSN
Data Repository for
offline analysis
Database Abstraction Layer
Database Abstraction Layer
SELECT Temp, Humid,
NodeID
FROM sensors
SAMPLE PERIOD 5s

Base
Station

Node ID

Temperature

Humidity

1

127

44

2

119

47

3

120

45

4

123

40

5

120

46

WSN
Database Abstraction Layer
• Local computations are much cheaper
than communication
– Pushing partial computations out into the
network
Database Abstraction Layer
• Retrieves data only upon user demand
• No offline data storage

• Energy Efficient
Architecture
Architecture - Overview

Query Proxy Layer
Query Optimizer
Query Proxy Layer

Application Layer
Query Proxy Layer
Routing Layer
Other Layers
Query Optimizer
• Generates “Query Processing Plans”
• Refers to
– Catalog Information
– Query Specification

• Specifies
– Data Flow between sensors
– Computation Plan

• Finally, plan is disseminated to all sensors
Example
User Query
“Notify when
the average temperature
exceeds 35 °C”

WSN
Query Optimizer
“Notify when
the average temperature
exceeds 35 °C”

Query
Optimizer

Query Plan
Query Plan

Query Plan (QP)

• Designates the Leader node
– Where average value will be finalized
Leader Node
Query Plan

Query Plan (QP)

• Two computation plans
i. Leader Node
ii. Non-Leader Nodes
QP for Non-Leader Node

Non-Leader Node
QP for Non-Leader Node
In-network
Aggregation

Network
Interface

Sensor
Scan
QP for Non-Leader Node
In-network
Aggregation

1
Network
Interface

Sensor
Scan
Temperature = 38
°C
QP for Non-Leader Node
In-network
Aggregation

2
Network
Interface

Sensor
Scan
Temperature = 38
°C
QP for Non-Leader Node
In-network
Aggregation

Network
Interface

Sensor
Scan
QP for Non-Leader Node
In-network
Aggregation

2
Network
Interface
AVG Temperature
= 35 °C
Contributor Count = 1
AVG Temperature
= 36 °C
Contributor Count = 1

Sensor
Scan

Temperature = 38
°C
QP for Non-Leader Node
In-network
Aggregation

Network
Interface
AVG Temperature
= 35 °C
Contributor Count = 1
AVG Temperature
= 36 °C
Contributor Count = 1

Sensor
Scan

Temperature = 38
°C
In-Network Aggregation
AVG Temperature
= 35 °C
Contributor Count = 1

AVG Temperature
= 36 °C
Contributor Count = 1

Total Temperature
No of Contributors
AVG Temperature

Temperature = 38
°C

= 35*1 + 36*1 + 38
= 109
=3
= 109 / 3
= 36.33

AVG Temperature
36.33 °C
Contributor Count = 3

=
QP for Non-Leader Node
Towards the Leader

AVG Temperature
In-network
36.33 °C Aggregation
Contributor Count = 3

Network
Interface

=

Sensor
Scan
QP for Leader Node
Leader Node
QP for Leader Node
Towards the Leader
Select
AVG > threshold
Average Value
Aggregate
Operator (AVG)
Partially aggregated
results
Network
Interface
QP for Leader Node
Towards the Leader
Select
AVG > threshold
Average Value
Aggregate
Operator (AVG)

Network
Interface

Partially aggregated
results
1
QP for Leader Node
Leader Node
AVG Temperature
39 °C
Contributor Count = 2

=

AVG Temperature
36.33 °C
Contributor Count = 3

=
QP for Leader Node
Towards the Leader
Select
AVG > threshold
Average Value
Aggregate
Operator (AVG)
Partially aggregated
results
AVG Temperature
39 °C
Contributor Count = 2

=

Network
Interface

AVG Temperature
36.33 °C
Contributor Count = 3

=
Aggregate Operator
AVG Temperature
39 °C
Contributor Count = 2

=

AVG Temperature
36.33 °C
Contributor Count = 3

Total Temperature

= 39*2 + 36.33*3
= 186.99
No of Contributors = 5
AVG Temperature = 186.99 / 5
= 37.40
AVG Temperature
37.40 °C

=

=
QP for Leader Node
Towards the Leader
Select
AVG > threshold
Average Value
AVG Temperature
37.40 °C

=

Aggregate
Operator (AVG)
Partially aggregated
results
Network
Interface
QP for Leader Node
Towards the Leader
AVG Temperature
37.40 °C

=

Select
AVG > threshold

“Notify when
Threshold = 35 °C
the average temperature
exceeds 35 °C”

Average Value
Aggregate
Operator (AVG)
Partially aggregated
results
Network
Interface
User Query Result

ALERT!
Temperature exceeds 35 °C

WSN
Research Problems
1. Aggregation
• Most popular computation and
communication pattern
• Two important issues
– Leader Selection
– Data Delivery
Leader Selection
Requirements for the policy
i. Dynamically-maintained Leader
ii. Physically advantageous location
Leader Selection
Requirements for the policy
i. Dynamically-maintained Leader
ii. Physically advantageous location
Data Delivery
“How should the data be delivered from
source nodes to the leader?”
– Send all data to leader?
– Should intermediate nodes participate?
2. Query Language
“What types of queries should be
supported?”
3. Query Optimization
• Cost of query plan has changed
• Energy should be the focus
• Reactive to changes in catalog information
– Changes in topology
– Power level at sensor nodes
4. Catalog Management
• Maintained at the server
• Provides Meta Data about the network
• Question: What is the best way to main
the catalog?
5. Multi-Query Optimization
• Occurs when the WSN is shared
• Users may pose similar queries
• Share common data among the users
Conclusion
• Interacting with a WSN is made easy
• Database Abstraction layer provides
– Friendly Interface
– Efficient scheme to reduce energy consumption

• Research problems need to be carefully
addressed
My Views on the Paper
• Presents a concept
• Easy-to-understand
• Flow of the paper sometimes confuse the
reader
Q&A

The cougar approach to in-network query processing in sensor networks

Editor's Notes

  • #6 I think all of you are aware of the concept “Database Abstraction Layer for Sensor Networks”. As you can see in the citation-count vs. year graph, it has being most cited in 2008 Having this motivation in mind, let’s move on.
  • #11 Linking: Besides these limitations, WSNs are successfully used in a wide variety of application domains.
  • #13 At the time of writing this paper, the authors have percieved the future of
  • #15 Seeing this future, the authors identified two facts that motivated them to come up with the Database Approach for WSNs.
  • #16 The first reason is As the popularity of the WSNs grow, they may be used by technically expert users as well as non-expert users. To cater such a diversified user group, it would be useful if a middleware can provide an abstract view of the WSN that hides the underlying messy details of the WSN. By giving users a declarative query interface, they can issue queries without even knowing how the data is generated in the sensor network, how they are processed, and how the answers are computed.
  • #17 Link to the next slide  Motivated by these facts and as a solution to these issues, the Database Abstraction Layer for WSNs was introduced.
  • #19 The Database Abstraction Layer allows the users to issue SQL-like queries to retrieve data from the WSN. This Layer hides all the complex and messy details of the underlying WSN by giving users a feeling like they are using a traditional database management system. Further,
  • #23 The architecture of the Database Abstraction Layer spans over two main regions: Gateway node WSN Note that here the gateway node is excluded from the WSN and it is considered as an external entity.
  • #25 Query Optimizer generates “Query Processing Plans” upon receiving a query from a user.
  • #31 The query plan for a non-leader node has 3 components:
  • #32 The query plan for a non-leader node has 3 components:
  • #33 The query plan for a non-leader node has 3 components:
  • #34 The query plan for a non-leader node has 3 components:
  • #35 The query plan for a non-leader node has 3 components:
  • #36 The query plan for a non-leader node has 3 components:
  • #37 The query plan for a non-leader node has 3 components:
  • #39 The query plan for a non-leader node has 3 components:
  • #46 The resulting aggregate value from the Aggregate Operator step will be passed to the next step: Selection
  • #47 The resulting aggregate value from the Aggregate Operator step will be passed to the next step: Selection
  • #50 Most popular computation and communication pattern for WSN This is the same operation that we considered in the example. To support aggregation we have to address two research problems: Leader Selection Data Delivery
  • #58 With the introduction of such a layer, However consequent to that several research problems have arrived that need to be addressed to achieve the fullest potential of a DB Layer.