## 1 Introduction  
In many emerging applications one needs to process a continuous stream of data in real time. Sensor networks [1], network monitoring [2], and real-time analysis of financial data [3, 4] are examples of such applications. Monitoring queries is a particular class of queries in the context of data streams. Previouswork in this area deals with monitoring simple aggregates [2], or term frequency occurrence in a set of distributed streams [5]. A general framework for efficient local algorithms monitoring \(l_{2}\) norm of the data average of large networks of computers, wireless sensors, or mobile devices was introduced in [6], and further developed in [7]. The current contribution is motivated by results recently reported in [8,9] with focus on a special case of the general model considered in [7]. This special case can be briefly described as follows:  
Let \(\mathbf{S}=\{\mathbf{s}_{1},\ldots,\mathbf{s}_{n}\}\) be a set of data streams collected at \(n\) nodes. Let \(\mathbf{v}_{1}(t),\ldots,\mathbf{v}_{n}(t)\) be \(d\) dimensional real time varying vectors derived from the streams. For a function \(f\ :\ \mathbf{R}^{d}\rightarrow\mathbf{R}\) we would like to confirm the inequality  
\[f\left(\frac{\mathbf{v}_{1}(t)+\ldots+\mathbf{v}_{n}(t)}{n}\right)>0 \tag{1}\]  
while minimizing communication between the nodes. Monitoring inequality (1), or monitoring geometric location of the mean is a problem that can be addressed using a variety of different mathematical tools. A specific choice of a monitoring tool is up to the user. We note that the problem as stated above does not specify any particular tool, \(l_{2}\), or any other norm that is required to address it. The problem was recently addressed in [10], where the approach proposed imposes equal constraints on each node. In addition to previously used \(l_{2}\) norm (see, e.g., [6, 7, 8, 9, 11]) the paper provides theoretical framework for using a wide variety of convex functions, and, as an illustration, runs numerical experiments using \(l_{2}\), \(l_{1}\) and \(l_{\infty}\) norms. In all numerical experiments reported in [10] an application of the same algorithm with \(l_{1}\) norm generates superior results. This paper extends results in [10] in a machine learning direction--a constraint imposed on each node depends on the stream history at the node. As a simple illustration of the problem considered in the paper we focus on two scalar functions \(v_{1}(t)\) and \(v_{2}(t)\), and the identity function \(f\) (_i.e._, \(f(x)=x\)).We would like to guarantee the inequality  
\[v(t)=\frac{v_{1}(t)+v_{2}(t)}{2}>0\]  
while keeping the nodes silent as much as possible. A possible strategy is to verify the initial inequality \(v(t_{0})=\frac{v_{1}(t_{0})+v_{2}(t_{0})}{2}>0\) and to keep both nodes silent while  
\[|v_{i}(t)-v_{i}(t_{0})|<\delta=v(t_{0}),\ t\geq t_{0},\ i=1,2\]  
The first time \(t_{1}\) when one of the functions, say \(v_{1}(t)\), crosses the boundary of the local constraint, _i.e._, \(|v_{1}(t_{1})-v_{1}(t_{0})|\geq\delta\) the nodes communicate, the mean \(v(t_{1})\) is computed, the local constraint \(\delta\) is updated and made available to the nodes, and nodes are kept silent as long as the inequalities hold. \[|v_{i}(t)-v_{i}(t_{1})|<\delta,\ t\geq t_{1},\ i=1,2\]  
The main contributions of this paper are listed next. We demonstrate that:  
1. This approach works for a non-linear monitoring function \(f\). 2. The results depend on the choice of a norm, and the numerical results reported show that \(l_{2}\) is probably not the best norm when one aims to minimize communication between nodes. In addition to the numerical results presented we also provide a simple illustrative example that highlights this point (see Remark 4.2). 3. Selection of node dependent local constraints may decrease communication between the nodes. 4. The approach suggested in [10] and adopted in this paper paves the way to achieve further communication savings by clustering nodes, and monitoring cluster coordinators.