50 likes | 230 Views
Within each batch: Semantics: each query must be evaluated No overlapping windows Queries are cindependent . Batching. If queries are indendent , the batch version would just use the non-batch algorithm for each query. Stream windows. Time. ANY alert. To correlate queries:
E N D
Within each batch: Semantics: each query must be evaluated No overlapping windows Queries are cindependent. Batching If queries are indendent, the batch version would just use the non-batch algorithm for each query Stream windows Time ANY alert To correlate queries: Semantics: stop as soon as ANY query alerts, OR Some overlapping windows These correlations make acquisition order in a batch significant Query Query Query Query Query Query Query Query ω ω ω ω ω ω ω ω Stream windows Time Lipyeow Lim
Multi-Query Multiple queries at each instant can be correlated via: Semantics: stop as soon as ANY query alerts, OR Rely on common streams Overlapping windows in common streams But “ANY alert” probably not the right semantics. Medical apps might want “ALL alerts” We need to think of how we handle multiple queries at each evaluation instant as well: ANY alert Query 1 Query 2 Query 3 Query 4 • Computation model depends on how we treat overlapping windows. • If we merge overlapping windows, • Model the computation as a bi-partite graph • Pick an ordering of stream windows (acquisition) that maximizes an objective function • Would be nice to characterize a version of the problem theoretically. Lipyeow Lim
Objective Function Assume we merge overlapping windows on the same stream. Given an ordering of the edges of the bi-partite graph, • Given the data in the stream windows, we can calculate precisely the acquisition cost (in energy) • If we don’t have the data, but have the probabilities that each predicate in each query is true or false, we can calculate the expected acquisition cost • An ordering of the edges uniquely identifies an ordering of the stream windows. (m-to-1 relationship) Let’s look at the problem from bottom up. Given an ordering of the stream windows. • For each stream window that is used by multiple predicates, find an optimal evaluation order of the predicates. • Use that order of all predicates to calculate expected acquisition cost. • Design a heuristic function with which to sort (ascending) the stream windows, • Heuristic function must not depend on the order of the stream windows. • Proportional to the reduction in the uncertainty of all dependent queries and the acquisition energy ANY alert Query 1 Query 2 Query 3 Query 4 Lipyeow Lim