700 likes | 952 Views
In-Network processing. Jigar Doshi. What is TAG. Tiny Aggregation for Sensor Networks Provides an SQL interface to query sensor networks with aggregates like count, max, min etc Sensitive to constraints of ad-hoc sensor networks Query inserted into network over an existing routing protocol
E N D
In-Network processing Jigar Doshi
What is TAG • Tiny Aggregation for Sensor Networks • Provides an SQL interface to query sensor networks with aggregates like count, max, min etc • Sensitive to constraints of ad-hoc sensor networks • Query inserted into network over an existing routing protocol • Aggregation done along the reverse path
TAG - Motivation • An aggregation service for Berkeley Motes • Sensor Networks will be used by practitioners in variety of fields • Civil engineers to monitor buildings during earthquakes • Biologists for habitat monitoring • All applications depend on extracting info from the network. • Thus it must be a core service and easy to use. • TAG fills this void
Requirements of the Routing Algorithm • Deliver Query requests to all nodes • Route from every node to root • No Duplicates ! • Does it violate the end-to-end principle? • A simple example proposed : tree based routing
Tree Based Routing • One root • Any interior node sets sender as parent and sets its level to that of parent + 1 • Rebroadcasts • Message sent by node to its parent eventually reaches root • Reselect parent after k silent epochs Query 1 P:0, L:1 2 3 P:1, L:2 P:1, L:2 4 P:2, L:3 6 P:3, L:3 5 P:4, L:4
Query Model • One Table : sensors • SELECT AVG(volume), room FROM sensorsWHERE floor = 6GROUP BY roomHAVING AVG(VOLUME) > thresholdEPOCH DURATION 30s • In generalSELECT {agg(expr), attrs} FROM sensorsWHERE {selPreds}GROUP BY {attrs}HAVING{havingPreds}EPOCH DURATION I • Difference between TAG & SQL : Continuous Output
Aggregate Structure • Standard SQL supports “the basic 5”: • MIN, MAX, SUM, AVERAGE, and COUNT • TAG supports any function conforming to • Merging function f. Merges two partial state records • Initializer i: Instantiates a state record for a single sensor value • Evaluator e: Computes the actual value of the aggregate from a partial state record • Example - average • f{<S1, C1>, <S2, C2>} < S1 + S2 , C1 + C2> • i{v} <v,1> • e{<S1, C1>} S1/C1 • TAG supports MEDIAN, HISTOGRAM and COUNT DISTINCT also
Classifying Aggregates • Duplicate Sensitive (yes/no) • Exemplary/Summary • Monotonics’ = f(a,b) e(s’) >= MAX(e(s1),e(s2)) OR e(s’) <= MIN(e(s1),e(s2)) • Decides whether predicate can be applied in network • Partial State • Distributive • Algebraic • Holistic • Unique • Content Sensitive
The TAG Algorithm • 2 Phases • Distribution: Queries are pushed down the network. • Parents broadcast queries to their children • Collection: Aggregate values continuously sent from children to parents • Reply from all children required before forwarding an aggregate value • TDMA like partitioning • Children must deliver records during a parent-specified time interval • Parent collects all values (including its own) and sends the aggregate up the tree • Result: a single aggregate value per epoch • Question : Contention ?
Flow of partial State • Parent reception interval must be chosen carefully • All children must be able to report • Cannot exceed end of epoch • However we can always make the algorithm pipelined
Illustration: Pipelined Aggregation 1 2 3 4 5 Epoch 3 4 SELECT COUNT(*) FROM sensors 1 3 Sensor # 2 Epoch # 1
Illustration: Pipelined Aggregation 1 2 3 4 5 SELECT COUNT(*) FROM sensors Epoch 4 5 1 3 Sensor # 2 Epoch # 1
Illustration: Pipelined Aggregation 1 2 3 4 5 SELECT COUNT(*) FROM sensors Epoch 5 5 1 3 Sensor # 2 Epoch # 1
Grouping • Simple aggregation mechanism • Complicated by HAVING clause • Group eviction to solve storage problem • Evicted tenant sent to parent
Simulation Environment • Java-based simulation & visualization for validating algorithms, collecting data. • Coarse grained event based simulation • Sensors arranged on a grid, radio connectivity by Euclidian distance • Communication model • Lossless: All neighbors hear all messages • Symmetric links • No collisions, hidden terminals, etc. • Realistic • Number of hops related to distance but not proportional
Simulation Results • 2500 nodes, d=50 • TAG outperforms centralized approach by an order of magnitude in most cases • Does equally well in the worst case • Actual benefit depends on the topology
Experiment: Basic TAG Dense Packing, Ideal Communication
Experiment: Hypothesis Testing Uniform Value Distribution, Dense Packing, Ideal Communication
TAG Loss Tolerance • Maintain List of the link signal quality to the neighbors and if better shift parent • If no hello for a . Assume that the parent has moved away. Pick a new parent • You can pick a node below you in the tree so child may have to reselect their parent
Experimental Results • 16 nodes, depth 4 tree, COUNT aggregate# of messages • Centralized: 4685 • TAG: 2330 • Quality of aggregate is better with TAG • Centralized case: high loss due to contention
Summary • TAG is based on a declarative interface • Uses aggregation extensively • Makes network tasking easier for the end user • TAG outperforms centralized approaches in most cases • Aggregation again • Relies heavily on the underlying routing layer • Placement of query tree is constrained by the characteristics of routing tree
Critique • Fault Tolerance – too simplistic • How high is the failed node on the tree • Mobility • Multiple Queries ? • Query Optimization • Cougar • Congestion • Generic ?
Time Indexing in Sensor Networks Rong Zheng, GuangHui He, Indy Gupta, Jennifer C Hou, Lui Sha UIUC
What is Time Indexing • Sensor networks collect periodic data • Therefore lot of the queries of the data are temporal • What is the average temperature last saturday • Time Indexing refers to storage of Data based on the time attribute • Data is stored on a cluster head depending on the time it has occurred • Allows easy retrieval of temporal information
Storage of Information in a sensor network • Can store data either • Externally i.e Centralized or along perimeter • Locally at the sensor node • In-Network i.e intermediate super nodes • Many queries temporal in nature thus info can be time indexed • To provide time indexing rendezvous points are proposed
The Problem • Time Indexed Storage maps and stores time indexed data {x(v,t)|v ε V, t ε (m∆t, m+1∆t)}to a subset of nodes in the network . A time-indexed query retrieves the individual or aggregated sensor reading during the same time • Time Indexing Problem is concerned with efficient storage and retrieval of info based on the time attribute.
Requirements of the Solution • Distributed time indexed storage • Retrieve info based on time attribute • So what are the requirements of any solution applicable to sensor nets? • Low protocol Overhead • Low Communication query overhead • Energy balancing • Solution: Use Dominating Sets !
Dominating Sets • For a graphG and a subset S of the vertex setV(G), denote by Ng(s) the set of vertices in G which are in S or adjacent to a vertex in S. If Ng(s) = V(G), then S is said to be a dominating set (of vertices in G). • Applied to a lot of problems like adhoc routing. There we need one such set. Here we need multiple sets • Can be one hop or k hop. Only one hop used here but can be extended to k-hop. • But finding the dominating set here is not very straight forward
Selecting the Nodes - Overview • Each node has a schedule vector where 1 indicates that it is a leader for that cycle • If node is a leader it uses more power. Therefore goal is to minimize average power consumption of the network • This can be rewritten as:
However previous case not always optimal as the selected nodes will run out of power • Thus We need load balancing, Therefore we introduce a new function U(x) • The function U(x) determines behavior of algorithm • Now problem can be defined as
Choices For U(x) • U(x) = -x. Minimizes total number of 1 slotsProblem: Dominating nodes run out of power • U(x) = -(-log(x/T)) - max min allocation tries to maximize time till first node runs out of energy • U(x) = log(1-x/T) – Load balancing
Localized Algorithm for RP election • The problem is NP complete • However if we restrict to integers problem can be solved in polynomial time • Do a newton like method to reach solution (Gradient descent too slow) • Algorithm is localized as constraints are localized • Only p and y is exchanged at every step • We derive a heuristic which is simpler later
Information retrieval • Three steps • Inject Query • RP to RP forwarding • Accumulation at a point • Overlay Construction • Send messages with source ip and sequence number and the broadcast it. Thus each nodes which overlay stores what time. • To find data send an overlay message to the person who has the data routed using the routing table • Send data back once it reaches target O(|V|) • Total query Messages
Future Directions • Weighted Utility Functions • K Domination instead of 1 domination • Variable query Interval • Failure of Nodes? Fault Tolerance • Node Movement? • Messages have to be re-routed • Fisheye Routing
Localized Algorithms In Wireless Ad-Hoc Networks: Location Discovery And Sensor Exposure Seapahn Meguerdichian, Sasha Slijepcevic,Vahag Karayan1, Miodrag Potkonjak UCLA
What are Localized Algorithm • Generic technique for solving distributed optimization problems in wireless networks • Take into account topology, available energy, power, privacy requirements, etc. • Obtain only needed information and use it to guide optimization • Take into account problem properties
Localized Algorithm Components • Data acquisition mechanisms • Optimization mechanisms • Search expansion rules • Bounding conditions • Termination rules
Generic Localized algorithm • Initiate Search; • Request info from neighbours • Loop while !terminate • Form Partial Solution • Decide which nodes to contact. • Decide Whom to terminate • Contact Nodes • End Loop
Sensor Coverage • Given: • Field A • N sensors • Initial and final points I and F • How well can the field be observed • Closest Sensor (minimum distance) only • Multiple Sensors: speed and path considered • We have to find the Minimal Exposure Path PminE in A, starting in I and ending in F • PminE is the path in A, along which the exposure is the smallest among all paths from I to F.
Sensor Exposure Suppose S(s,p) represents the non-negative sensibility of sensor s to the point p. For example: The Exposure for an object in the sensor field during the interval [t1,t2] along the path p(t) is: