300 likes | 430 Views
Similarity-Aware Query Processing in Sensor Networks. Ping Xia Panos K. Chrysanthis Alexandros Labrinidis Advanced Data Management Technologies Lab University of Pittsburgh. Disasters happen… What next?. Use sensor networks to predict and mitigate disasters
E N D
Similarity-Aware Query Processing in Sensor Networks Ping Xia Panos K. Chrysanthis Alexandros Labrinidis Advanced Data Management Technologies Lab University of Pittsburgh
Disasters happen… What next? • Use sensor networks to predict and mitigate disasters • Use sensor networks to respond to disasters efficiently • Use sensor network data to improve response in the future ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Q1 Q3. Q2 Pitfalls of Base Station Architecture ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Q4 Q1: Temp>200 AND 20< Light Level <40 Q3 Q2: Temp>250 AND 25< Light Level <35 Data Centric Storage (GHT) Some queriesare similar! Consolidator-Node ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Roadmap • Motivation • Similarity-Aware Query Processing • Evaluation • Conclusions ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Q1: Temp>200 AND 20< Light Level <40 Q2: Temp>250 AND 25< Light Level <35 Similarity-Aware Query Processing (SAQP) O-Node I-Node Q-Node M-Node O-Node Q-Node ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
SAQP Algorithm Three steps: • A Q-node sends a query to an I-node. • I-node checks list of candidate O-nodes and list of candidate M-nodes, from which a set of nodes is selected as responder set. • Query is forwarded to nodes in the responder set and satisfactory events are sent from those nodes to the Q-node. ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Issues • Query split • Query range [(5, 30), (10, 25)] M-View with range [(10, 25), (15, 20)] • Candidate selection • How to determine the responder set from the candidate O-nodes and candidate M-nodes? ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Query split Q: r 5 10 25 30 10 r1 r2 r3 15 r4 r5 r6 20 r7 r8 r9 25 Q1: r5 --- Send to the corresponding M-node Q2: ? --- For further evaluation Solution: r1+r2+r3+r4+r6+r7+r8+r9 ? Solution: r – r5 ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Candidate Selection A greedy algorithm: 1. Responder = Φ, CandidateONodes = {Onodes with satisfactory events} , CandidateMNodes = {Mnodes such that their ranges overlap with query range}. 2. If set CandidateMNodes != Φ, pick one and add it into set Responder. Meanwhile, remove some Onodes from set CandidateOnodes if their events are covered. 3. If there are energy saving, keep the change. Otherwise, undo the change. 4. Do step 2 and 3 until CandidateMNode = Φ 5. Responder = Responder + (remaining) CandidateONodes ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Roadmap • Motivation • Similarity-Aware Query Processing • Evaluation • Conclusions ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Evaluation • Energy Model • Etransmit = Etrans * k + Eamp * d2 • Ereceive = Erec * k • Metrics • Energy Cost • Response time (# of hops) • 3 schemes: • GHT (Geographic Hash table, WSNA 02) • IGHT (Index-based GHT) • SAQP ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Experiments Sensitivity analysis on: • Query Skewness • Q(VLow:VHigh, t-Delta:t), VHigh-VLow is fixed and the center (VHigh+VLow)/2 follows zipf distribution. • Time Interval • Q(VLow:VHigh, t-Delta:t) • Query Locality • Confining factor C restrict queries issued from a region with size (C*X) x (C*Y) • Event Size • Number of Queries • Number of Events ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Simulation parameters ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Query Skewness Energy Consumption Response Time Higher energy savings if queries are more skewed (more similar) ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Time Interval Energy Consumption Response Time Higher energy savings compared to IGHT, if query range is large ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Query Locality Energy Consumption Response Time Higher energy savings if queries initiated from same region ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Roadmap • Motivation • Similarity-Aware Query Processing • Evaluation • Conclusions ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Conclusions • We proposed a similarity-aware query processing (SAQP) scheme that • creates materialized views in sensor networks • utilizes the materialized views to answer future queries that are similar to past ones. • By using our query split strategy and candidate selection algorithm, SAQP: • reduces energy consumption, • with a slight increase in response time, • without compromising QoD. ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Thank You Questions? ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
BACKUP ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Our Framework • O-node (Original node): Where the events are stored (locally). • Q-node (Query node): The node who issued the current query. • M-node (M-view node): A Q-node that has issued a query in the past becomes a M-node for future queries. (Query results) M-Views are stored at M-nodes. • I-node (Index node): Where the indexes to events and directories of materialized-views are stored. Each directory is associated with a query processed in the past. ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
The framework (cont.) • Events: O-nodeId, scalar attributes, event details, timestamp • Indexes: O-nodeId, scalar attributes, timestamp • M-View directories: M-nodeId, range, timestamp ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
QoD • Two events (e1, e2 in time order) are detected by the same O-Node • A Query (q) is initiated after the two events are detected. • Both events and the query are forwarded to the I-Node, but it reaches the I-Node in the order: e1, q and e2. • In GHT, only e1 will be returned. • In SAQP, the O-Node might be selected as a responder, both e1 and e2 will be returned. • Conclusion: SAQP achieves better QoD ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Event size ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Number of Queries ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
Number of Events ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
GPSR – Greedy Forwarding D x y ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
GPSR – Greedy Forwarding Failure ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu
GPSR – Perimeter Forwarding d z z e e c c a a f x x b ADMT Lab, Univ. of Pittsburghhttp://db.cs.pitt.edu