Query Processing for Sensor Networks - PowerPoint PPT Presentation

1 / 49
About This Presentation
Title:

Query Processing for Sensor Networks

Description:

1. Query Processing for Sensor Networks. Yong Yao Johannes Gehrke. Department of ... [5] J. Broch, D. A. Maltz, D. B. Johnson, Y.-C. Hu, and J. Jetcheva. ... – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 50
Provided by: baek
Category:

less

Transcript and Presenter's Notes

Title: Query Processing for Sensor Networks


1
Query Processing for Sensor Networks
  • Yong Yao Johannes Gehrke
  • Department of Computer Science
  • Cornell University
  • Ithaca, NY 14850
  • yao,johannes_at_cs.cornell.edu
  • Presented by Tong Kwan-Ho

2
Road Map
  • Introduction
  • Design goals of Query layer
  • Preliminaries
  • Aggregate Query
  • Routing
  • Query Plans
  • Conclusion

3
Introduction
  • Recent developments in hardware have enabled the
    widespread deployment of sensor networks
    consisting of small sensor nodes with sensing,
    computation, and communication capabilities.
  • Applicable to different types of applications and
    areas.
  • Range from inventory maintenance, to military
    applications.

4
In this paper
  • Design of a query layer for sensor networks
  • Main architectural components of such a query
    layer
  • Concentrating on
  • in-network aggregation,
  • interaction of in-network aggregation with the
    wireless routing protocol, and
  • distributed query processing.

5
Communication - Resource Constraints
  • Wireless network connecting the sensor nodes
    provides only a very limited quality of service
  • latency with high variance,
  • limited bandwidth,
  • frequently drops packets

6
Power consumption - Resource Constraints
  • Limited supply of energy
  • ?design considerations
  • energy conservation
  • E.g. MICA motes - 2 AA batteries
  • one year in the idle state, or
  • one week under full load

7
Computation - Resource Constraints
  • Limited computing power and memory sizes.
  • ? Restricts
  • The types of data processing algorithms
  • The sizes of intermediate results

8
Uncertainty in readings - Resource Constraints
  • Sensor might generate inaccurate data
  • Noise
  • Improper sensor placement
  • (such as a temperature sensor directly next to
    the air conditioner might bias individual
    readings)

9
Sensor usage in the future
  • There are more and more chances to use sensors
  • Daily Life approach
  • E.g. There will be sensor in offices to measure
    temperature, noise, light
  • Interact with the building control system
  • Is Yong in his office?
  • Is there an empty seat in the meeting room?
  • Scientific approach
  • Biologist birds tracking

10
  • Design goals
  • of
  • Query layer for wireless network

11
Declarative queries - design goals
  • 1. Declarative queries are especially suitable
    for sensor network interaction
  • Clients issue queries without knowing how the
    results are generated, processed, and returned to
    the client.

12
Preserve limited resources - design goals
  • 2. Preserve limited resources
  • Energy, bandwidth in battery-powered wireless
    sensor networks.
  • Data transmission back to a central node,
    querying, and data analysis are very expensive
  • part of the computation can be moved from the
    clients and pushed into the sensor network.
  • to reduce energy consumption and reduce bandwidth
    usage
  • (vs traditional centralized data extraction and
    analysis)
  • ? extend the lifetime of the sensor network
    significantly.

In-Network Processing
13
Different requirements - design goals
  • 3. Different applications have different
    requirements, from accuracy, energy consumption
    to delay.
  • short life time with high degree of dynamics ?
  • VS
  • power-efficient execution of long-running?
  • ?The query layer can generate query plans with
    different tradeoffs for different users.

14
Query Proxy
  • The component of the system that is located on
    each sensor node.
  • Query proxy provides higher-level services
    through queries.

15
  • Preliminaries

16
Sensor Networks
  • Sensor network a large number of sensor nodes.
  • Each (sensor) nodes are connected to neighbors
    through a wireless network.
  • They use a multi-hop routing protocol to
    communicate with nodes that are spatially
    distant.
  • Sensor nodes limited computation and storage
    capabilities
  • general-purpose CPU to perform computation
  • small amount of storage space to save program
    code and data.

17
Sensor Networks
  • Gateway nodes
  • connected to components outside of the sensor
    network through long-range communication (such as
    cables or satellite links).
  • All communication with users of the sensor
    network goes through the gateway node.

18
Sensor Data
  • E.g. Sensors temperature, light, PIR sensors
  • Each sensor can measure the occurrence of events
  • Each sensor is a separate data source
  • generates records with several fields
  • (such as the id and location of the sensor that
    generate the reading a time stamp, the sensor
    type, and the value of the reading).

19
Sensor Data
  • Records of the same sensor type from different
    nodes have the same schema, and collectively form
    a distributed table.
  • The sensor network can thus be considered as a
    large distributed database system consisting of
    multiple tables of different types of sensors.

20
Sensor Data
  • Sensor data might contain noise
  • fusing data from several sensors
  • E.g. monitoring the concentration of a dangerous
    chemical in an area,
  • measure the average value of all sensor readings
  • report whenever it is higher than some predefined
    threshold.

21
Queries
  • Author declarative queries are the preferred
    way of interacting with a sensor network.
  • Query Template
  • SELECT attributes, aggregates
  • FROM Sensordata S
  • WHERE predicate
  • GROUP BY attributes
  • HAVING predicate
  • DURATION time interval
  • EVERY time span e

22
Queries
  • This query template has additional support for
    long running, periodic queries. (not in SQL)
  • DURATION, EVERY
  • Since many sensor applications are interested in
    monitoring an environment over a longer
    time-period, long-running queries that
    periodically produce answers about the state of
    the network are especially important.

23
  • Aggregate
  • Query

24
Simple Aggregate Query Processing
  • Without Group By and Having clauses
  • A very popular class of queries in sensor
    networks.

25
Example Aggregate Query
  • SELECT AVG(R.concentration)
  • FROM ChemicalSensor R
  • WHERE R.loc IN region
  • HAVING AVG(R.concentration) gt T
  • DURATION (now,now3600)
  • EVERY 10

The life time of this query is 1 hour
Capture the Sensor Reading every 10 seconds
26
In-Network Aggregation
  • Queries required data from distributed sensors
  • setup communication structures
  • It is called communication component
  • Minimized the power consumption
  • Compute partial aggregates at intermediate nodes
    as long as they are well-synchronized.

27
Direct delivery - In-Network Aggregation
  • 3 different techniques on how to integrate
    computation with communication
  • 1. Direct delivery
  • Each node sends a data packet towards the leader
  • The multi-hop ad-hoc routing protocol will
    deliver the packet to the leader.
  • Computation will only happen at the leader after
    all the records have been received.

leader
28
Packet merging - In-Network Aggregation
  • 2. Packet merging
  • In wireless communication, sending multiple
    smaller packets is much more expensive
  • Better to be one larger packet
  • Merge several records into a larger packet

can occurs at Intermediate sensor node
29
Partial aggregation - In-Network Aggregation
  • 3. Partial aggregation
  • For distributive and algebraic aggregate
    operators, we can incrementally maintain the
    aggregate in constant space
  • Intermediate sensor node will compute partial
    results

Me 5000
Total 20, avg 3000
Total 21, avg 3095
Intermediate sensor node
30
Average Delay vs. Network Size
Average Dissipated Energy
Graph grabbed from the original paper
31
Coordinate Sensor nodes
  • To perform packet merging or partial aggregation
  • A node n needs to decide whether other nodes are
    going to route data packets through it.
  • n has the opportunity of either packet merging or
    partial aggregation.
  • n needs to build a list of nodes it is expecting
    messages from
  • Decide how long to wait before sending a message
    to the next hop

Next hop
32
Incremental Time Slot Algorithm
  • Steps
  • 1. each sensor node sets up a timer
  • 2. waits for a special waiting time for data
    packets from its children
  • Simple, but large cost
  • how long a node needs to collect records?
  • frequently temporary link failures
  • expensive to update the time-out value
  • never completely time-synchronized
  • Not good

33
Authors Approach
  • Main idea Make use of historical information to
    predict future behavior
  • p expect to receive from n again
  • p add n to the waiting list
  • If the prediction fail
  • Use a timer to recover from false predication at
    parent node
  • The child generate a notification packet
  • This bi-directional predication approach is Good
    in practice

34
  • Routing

35
Routing and Crash Recovery
  • A packet is forwarded by internal nodes
  • Wireless
  • limited communication power
  • the communication link is not always fixed.
  • Low quality of the communication channel
  • network quite unstable.
  • Thus more complicated routing protocols are
    required for wireless networks

36
Routing and Crash Recovery
  • A separate routing layer in the protocol stack
  • provides a send and receive interface to the
    upper layer
  • hides the internals of the wireless routing
    protocol.

37
Wireless Routing Protocols
  • 2 main tasks of a routing protocol
  • Route discovery
  • Establishes a route connecting a pair of nodes
  • Route maintenance
  • repairs the route in case of link failures
  • For Sensor networks
  • A distributed and adaptive routing protocol
  • nodes share the routing decision
  • nodes can change routes according to the network
    status

38
Wireless Routing Protocols
  • AODV (Ad-hoc On-demand Distance Vector) is
    chosen.
  • Typical reactive routing algorithm.
  • Reasons
  • Can scale to large-size networks, with thousands
    of nodes.
  • AODV does not generate duplicate data packets,
  • AODV is popular

39
Route initialization - Modifications
  • Original AODV initializing the route for each
    node separately from the source node
  • Modification made broadcasting a route
    initialization message at the leader
  • Advantages nodes can save the reverse path as
    the route to the leader. (The message contains a
    hop count which is used for nodes to determine
    their depth in the tree.)

40
Local Repair - Modifications
  • Route maintenance
  • AODV find a new route if link broken
  • (Action broadcast a request to neighbor to find
    a new route)
  • New Idea use approximation that preserves
    relative depths
  • Advantages avoid the expensive operations of
    updating the depth of all nodes to the leader

41
Local Repair VS Original
Improved Local Repair Algorithm
Graph grabbed from the original paper
42
Bunch Repair - Modifications
  • Route maintenance
  • If a large number of links fails at the same time
    (may due to a large noise in the area).
  • repair all routes directly from the leader
  • (by re-broadcasting the route initialization
    message)

43
Bunch Repair VS Local Repair
Effect of Bunch Repair
Graph grabbed from the original paper
44
  • Query Plans

45
Query Plans
  • E.g. What is the quietest classroom?
  • 2 levels of aggregation
  • compute the average value of each classroom
  • select the minimum average over all classroom

46
To create a separate flow block can
  • aggregate sensor records of the same group as
    soon as possible
  • shorten the path length
  • allow to apply the predicate of the HAVING clause
    to the aggregate results earlier (which saves
    more communication if the selectivity of the
    predicate is low.)

47
Joins
  • E.g. Select all objects detected in Region R1 and
    R2
  • SELECT oid
  • FROM SensorData D1, SensorData D2
  • WHERE D1.loc IN R1 AND D2.loc IN R2
  • AND D1.oid D2.oid
  • Number of tuples will be increase or decrease?

48
Conclusion
  • Sensor networks will become popular, and the
    database community has the right expertise to
    address the challenging problems of tasking the
    network and managing the data in the network.
  • This paper is an initial step to query processing
    for sensor works.

49
Reference
  • 1 www.microsoft.com/windows/embedded/ce.net.
  • 2 www.redhat.com/embedded.
  • 3 ACM SIGMOBILE. Proceedings of MOBICOM 1998.
    ACM Press.
  • 4 L. Breslau, D. Estrin, K. Fall, S. Floyd, J.
    Heidemann, A. Helmy, P. Huang, S. McCanne, K.
    Varadhan,Y. Xu, and H. Yu. Advances in network
    simulation. IEEE Computer, 33(5)5967, May 2000.
  • 5 J. Broch, D. A. Maltz, D. B. Johnson, Y.-C.
    Hu, and J. Jetcheva. A performance comparison of
    multi-hop wireless ad hoc network routing
    protocols. 3, pages 8597.
  • 6 M. Calimlim, W. F. Fung, J. Gehrke, D. Sun,
    and Y. Yao. Cougar Project web page.
    www.cs.cornell.edu/database/cougar.
  • 7 S. Ceri and G. Pelagatti. Distributed
    Database Design Principles and Systems.
    MacGraw-Hill (New York NY), 1984.
  • 8 S. Das, C. Perkins, and E. Royer. Performance
    comparison of two on-demand routing protocols for
    ad hoc networks. In INFOCOM 2000, pages 312.
    IEEE.
  • 9 D. Estrin, R. Govindan, J. Heidemann, and S.
    Kumar. Next century challenges Scalable
    coordination in sensor networks. In MOBICOM 1999,
    pages 263 270. ACM Press.
  • 10 J. Gray, S. Chaudhuri, A. Bosworth, A.
    Layman, D. Reichart, M. Venkatrao, F. Pellow, and
    H. Pirahesh. Data cube A relational aggregation
    operator generalizing group-by, cross-tab, and
    sub-totals. Data Mining and Knowledge Discovery,
    1(1)2953, 1997.
  • 11 Z. Haas. The zone routing protocol (ZRP) for
    wireless networks. IETF MANET, Internet Draft,
    1997.
  • 12 D. L. Hall and J. Llinas, editors. Handbook
    of Multisensor Data Fusion. CRC Press, 2001.
  • 13 J. Hill and D. Culler. A wireless embedded
    sensor architecture for system-level
    optimization. Submitted for publication, 2002.
  • 14 C. Intanagonwiwat, R. Govindan, and D.
    Estrin. Directed diffusion A scalable and robust
    communication paradigm for sensor networks. In
    MOBICOM 2000, pages 5667. ACM Press.
  • 15 P. Johansson, T. Larsson, N. Hedman, B.
    Mielczarek, and M. Degermark. Scenario-based
    performance analysis of routing protocols for
    mobile ad-hoc networks. In MOBICOM 1999, pages
    195206. ACM Press.
  • 16 D. B. Johnson and D. A. Maltz. Dynamic
    source routing in ad hoc wireless networks. In
    Mobile Computing. Kluwer Academic Publishers,
    1996.
  • 17 J. Jubin and J. D. Tornow. The DARPA packet
    radio network protocol. Proceedings of the IEEE,
    75(1)21 32, Jan. 1987.
  • 18 D. Kossmann. The state of the art in
    distributed query processing. Computing Surveys,
    32, 2000.
  • 19 S. Madden and M. J. Franklin. Fjording the
    stream An architecture for queries over
    streaming sensor data. In ICDE 2002.
Write a Comment
User Comments (0)
About PowerShow.com