Abstract-We present an optimal distributed algorithm to adapt the placement of a single operator in high communication cost networks, such as a wireless sensor network. Our parameterfree algorithm finds the optimal node to host the operator with minimum communication cost overhead. Three techniques, proposed here, make this feature possible: 1) identifying the special, and most frequent case, where no flooding is needed, otherwise 2) limitation of the neighborhood to be flooded and 3) variable speed flooding and eves-dropping. When no flooding is needed the communication cost overhead for adapting the operator placement is negligible. In addition, our algorithm does not require any extra communication cost while the query is executed. In our experiments we show that for the rest of cases our algorithm saves 30%-85% of the energy compared to previously proposed techniques. To our knowledge this is the first optimal and distributed algorithm to solve the 1-median (Fermat node) problem.
I. OVERVIEW AND MOTIVATIONNetwork applications often need to perform in-network query processing. Sensor networks are being deployed in the physical or urban environment to benefit scientific research or security surveillance. An example of a query in a network, which is monitoring traffic in a busy downtown area, could be "How many cars took the same route of passing through intersections A, B and C?". To avoid the cost of communicating all the data lists from the nodes in regions A, B and C to the querying node, the query must be executed in-network. Data lists generated on the source nodes are fed into operators on intermediate nodes that combine several lists from different sources. The amount of data is reduced due to the selectivity of the operators and the data that reaches the querying node is the final answer.An operator, that is involved in the in-network processing, can be placed on a node of the network. It takes in elements from source nodes, processes them, and sends the output to either another operator node or to the sink. Shipping elements over an edge in the graph imposes a cost that is dependent on the weight of the elements. Therefore, the placement of an operator can greatly affect the cost of answering a query since it affects the number of edges the elements have to travel over and the weight of the elements, since usually the output weight is not the sum of the input weights. It is typical to have continuous queries that require an answer over a continuous period of epochs. In most applications the sources and operators are not producing the same weight of elements in every epoch. Similarly, nodes in the network might be mobile resulting in different hop-distances between nodes in every epoch. Therefore, the initial operator placement might not be good enough for future epochs. It is a large overhead to re-run the algorithms for finding a good placement for the operators of the query. Instead, the technique followed in literature is to update the placement of just the operators that are affected by the weight...