440 likes | 665 Views
Sensor Network Query Processing. Presented by 张建楠. Overview. Introduction Energy-Efficient Dynamic Query Routing Tree International Journal of Advanced Computer Science and Applications Vol.3, No.2, 2012 Resilient Sensor Network Query Processing Using Logical Overlays mobiDE’12.
E N D
Sensor Network Query Processing Presented by 张建楠
Overview • Introduction • Energy-Efficient Dynamic Query Routing Tree • International Journal of Advanced Computer Science and Applications Vol.3, No.2, 2012 • Resilient Sensor Network Query Processing Using Logical Overlays • mobiDE’12
Introduction • WSNs • Wireless sensor networks have emerged as an innovative class of networked systems due to the union of smaller , cheaper embedded processors and wireless interfaces with sensors based on micro-mechanical systems technology • Wireless sensor networks are useful data collection, event detection or entity tracking applications • Sensor Network(major constrains) • Limited processing • Limited storage capacity • Limited bandwidth • Limited energy
Introduction • How To View WSN • An instrument for data collection • Base station process data • Other nodes sense the physical world and send the sensed values • Problem • Sending all data in raw form to the base station cost too much • Solution • In-network processing • EECS: An energy efficient Clustering Scheme in Wireless Sensor Networks • EDRT : Energy-Efficient Dynamic Query Routing Tree • Construes the WSN as a distributed database Users specify their data requirements in the form of declarative queries ,then sensor network query processor (SNQR) compiles them into optimized QEPs for injection into the WSN.
EECS • Scheme The network is partitioned into a set of clusters with one cluster head in each cluster • Details Communication between cluster head and BS is direct(single-hop) In the network deployment phase , the BS broadcasts a “ hello ” message to all the nodes at a certain power level . By this way each node can compute the approximate distance to the BS based on the received signal strength.
EECS • Cluster head election • Nodes become candidate nodes with a probability T • Nodes in candidate set broadcast the COMPETE_HEAD_MSGs within radio range to advertise their wills • Once the candidate node finds a more powerful candidate node, it will give up the competition without receiving COMPETE_HEAD_MSGs, otherwise, it will be elected as HEAD in the end • Cluster formation • Each HEAD node broadcasts the HEAD_AD_MSG across the network • The PLAIN nodes receive all the HEAD_AD_MSGs and decided which cluster to join
EDRT • Objective To minimize the number of hops by increasing the amount of data merge processing , thus reducing the total number of generated messages to reach the destination. • Definition • Model a sensor network as an undirected graph G=(V,E) • V is a set of nodes • E is a set of edges • A root node is act as a base station • The distance from to is the length of a path from to with the minimum number of edges • The distance from the root node to is called the distance of • A candidate node is a node which satisfies the query qualification conditions in the WHERE clause of the query
EDRT • Example
EDRT • Definition • Parent candidate set • Sibling candidate set ? • The minimum distance of node i for query Q (denoted as md for brevity) is candidate parent md set for node i ,each member of this set consists of node id and md value is candidate sibling md set for node i • The first node to be received for query Q
EDRT • Algorithm • Candidate Set Decision Stage
EDRT • Algorithm • Candidate Set Decision Stage Level 0 1 2 3 Level 1 4 5 6 Level 2 Level 3 7 8 9 10 11 12 Level 4
EDRT • Algorithm • Query Dissemination and EDRT Construction Stage • When a user requests a query, the EDRT for the query is constructed through the query dissemination and candidate set decision stage • A query message contain query information and md value of a sender floods from the root node down the network • The format of query message is <dst_id,src_id,md,query>
EDRT • Algorithm • Query Dissemination and EDRT Construction Stage
EDRT • Algorithm • Query Dissemination and md value decision 1 2 3 4 5 6 7 8 9 10 11 12
EDRT • Algorithm • EDRT Construction 1 2 3 4 5 6 7 8 9 10 11 12
EDRT • Data Gathering in EDRT • Each sensor node sends data, which satisfy the query Q that was sent from the sink node, to sink node • While transmitting the result satisfying the query Q, each sensor node sends to parent or sibling node along the constructed tree • Each node aggregates the data when receiving the partial result • Data transmission start at the bottom of tree up to the root node • Partial aggregation and packet merge operations take place while transmitting packets from bottom node up to the root node
EDRT • Data Gathering in EDRT Phase 1, for given query Q, sensor nodes with md value of parent node is not zero transmit data to the parent node or sibling node Phase 2, all sensor nodes that have data to send transmit to parent node only 1 1 2 3 2 3 4 5 6 4 5 6
EDRT • Performance Evaluation • Performance of Various Query Selectivities
EDRT • Performance Evaluation • Performance of Various Network Size
EDRT • Performance Evaluation • Performance of Various Node Density
EDRT • Performance Evaluation • Performance of Data Gathering in Sink Node
Resilience to Node Failure • Introduction • SNQP Sensor network query processor that construe a WSN as a distributed , continuous query platform where the streams of sensed values constitute the logical extends of interest. • QEP Query evaluation plan
Resilience to Node Failure • Related Work • TinyDB • In TinyDB , the fact that routing trees are constructed during the QEP dissemination process provides some amount of inter-query fault tolerance • Each node in TinyDB evaluates the entire QEP , so ignoring a failed node is a sound strategy • AnduIn • AnduIn has no specific mechanism for fault tolerance • AnduIn compiles into Contiki that provides a TCP/IP-based communication protocol stack
Resilience to Node Failure • Related Work • SNEE • SNEE takes the connectivity graph as input and partition the QEPs into fragment • SNEE QEPs are particularly brittle • A participating node fails , poor performance, or even a crash could ensue • The lack of adaptation to tuple loss when the corresponding extent draws from a failed node • Although all sensed values are flowing out of the leaves, they cannot be used as they fail to reach some downstream operators • Publicly-released version of SNEE has no adaptive behavior
Resilience to Node Failure • Related Work • SNEE • The process of adapting to node failure • Compute new paths for routing tuples around the failed nodes • Reschedule the QEP fragment instances that were running on the failed node to nodes in the newly computed paths • The hypothesis is the benefit of adapting with a view to increasing the QEP lifetime outweighs the cost incurred in adaptation
Resilience to Node Failure • Technical Context • SNEE aims to generate energy-efficient QEPs. • The compilation/optimization process takes as input a SNEEqlquery • And the following kinds of metadata: • The current connectivity graph • The logical schema for the query
Resilience to Node Failure • Technical Context • And the following kinds of metadata: • The physical schema for the query • Statistics about nodes( e.g., available memory and energy stocks) • Cost-model parameters( e.g., unit costs for sleeping , sensing ,processing , and communicationg) • The SNEE Stack
Resilience to Node Failure • Technical Context • The SNEE Stack • The single-site phase(Steps 1-3 in Figure before) This phase comprises the classical steps needed to compile and optimize a query for centralized execution • The multi-site phase(Steps 4-7 in Figure before) This phase turns the PAF into a distributed algebraic form(DAF) for the query by making decisions that are specific to in-WSN execution
Resilience to Node Failure • Technical Context • The SNEE Stack • The multi-site phase(Steps 4-7 in Figure before) • Step 4 generates a routing tree(RT) • Step 5 partitions the PAF into fragment instances • Step 6 decides when to execute the different tasks in each participating node will execute that represented as an agenda • Step 7takes the RT from Step 4, the DAF from Step 5, and the agenda from Step 6 to produce a set of per-participating-node source files
Resilience to Node Failure • Technical Context • The SNEE Stack • The multi-site phase(Steps 4-7 in Figure before) SensornetDELIVER 8 SensornetPROJECT Confluence node 0 SensornetSELECT 1 2 3 SensornetJOIN 9 5 4 7 6 SensornetACQUIRE SensornetACQUIRE
Resilience to Node Failure • Technical Context • The SNEE Stack • The multi-site phase(Steps 4-7 in Figure before) • An agenda , i.e., a matrix where rows denote points in the query evaluation cycle, columns denote participating nodes, and the content of each cell defines the task scheduled for that node at that time
Resilience to Node Failure • Solution Details • Given a SNEE QEP q, if a participating node in q fails at runtime, adapt q so that its lifetime is extended • Compute an overlay network over the physical network , one logical node maps to k+1equipotent physical nodes • At compile-time, to replicate code on more nodes than would be needed and keep the replicas inactive until and unless nodes fail
Resilience to Node Failure • Solution Details • Generating Super-Overlays • CN——the set of candidate nodes • AN——the set of active nodes • W——the set of all nodes in the WSN that are not already participating in the QEP
Resilience to Node Failure 0(D) • Solution Details • Generating Super-Overlays • A node w in W is in the same super-overlay node as an active node c in CN with the conditions: • The available memory in w is at least the same as c • If c is an acquisition node, then c and w have been asserted to be equipotent • If there are edges between both w and lp(c), and w and lc(c) 5 1(σ,π) 3 4 8 7 2(R) 6(A)
Resilience to Node Failure • Solution Details • Generating Logical Overlays • The algorithm starts by traversing the RT from the root until it reaches a node that for which super-overlay node has been formed • The correctness condition is • There are k+1 physical nodes in every logical node • If two logical nodes form a logical edge, each physical in one logical node forms a physical edge with physical nodes in the other logical node 0(D) 5 3 1(σ,π) 4 7 2(R) 8 6(A)
Resilience to Node Failure • Solution Details • Assessing Logical Overlays • Assuming node failures are caused by energy depletion alone • Compute the set of k-resilient logical overlays, assess them • Determine which logical overlays lead to the longest estimated functional lifetime for the QEP • Selecting the logical overlay that leads to the best estimated lifetime for the QEP over a sequence of failures caused by energy depletion
Resilience to Node Failure • Solution Details • Replicating QEP Fragments 0(D) 5 1(σ,π) 4 3(σ,π) 3 7(R) 7 2(R) 8 6(A)
Resilience to Node Failure • Solution Details • Adapting to Run-Time Node Failure • The adaptive response leads to the following types of messages being sent and responded • Redirection messages • Activation messages 0(D) 5 4 3(σ,π) 3 1(σ,π) 2(R) 7 8 6(A)
Resilience to Node Failure • Experimental Evaluation • Experimental Procedure • Generating a set of 30 synthetic WSN topologies, with corresponding physical and logical schemas • Each topology comprises 30 nodes with random connectivity to a subset of other nodes • For each topology, query, logical and physical schemas, using SNEE generated the corresponding, initial QEP. • Computing costs include the OTAP costs of disseminating the initial QEP and the energy spent executing the QEP during the agenda cycles between failures
Resilience to Node Failure • Experimental Evaluation • Results and Observations
Resilience to Node Failure • Experimental Evaluation • Results and Observations
Resilience to Node Failure • Conclusion • Described the logical overlay strategy that enables k-resilience to successive node failures in the SNEE SNQP system • Provided experimental evidence showing that adapting to node failure is beneficial in extending the lifetime of QEPs and in increasing the number of tuples that are delivered to the base station over the lifetime of the QEP
ENDThank You 2012.10.24