TL;DR
This paper introduces GRETA, a novel approach for real-time aggregation of complex event trends in streaming data. By representing event trends as a graph and incrementally updating aggregates along its edges, GRETA significantly reduces computation and memory costs compared to existing two-step methods, achieving up to four orders of magnitude speedup.
What Problem Does This Paper Address?
Complex Event Processing (CEP) systems are crucial for analyzing high-velocity data streams in applications like algorithmic trading and traffic management. These systems often need to detect and aggregate "event trends" – sequences of events that can be arbitrarily long and complex, defined by Kleene closure. Traditional CEP systems tackle this by first constructing all possible event trends and then aggregating them. However, this two-step approach suffers from exponential time and space complexity due to the sheer number of potential trends, leading to high latency and memory usage that is unacceptable for real-time applications. The paper aims to bridge this gap by enabling efficient, real-time event trend aggregation without the costly intermediate step of explicit trend construction.
Methods
GRETA introduces a Graph-based Real-time Event Trend Aggregation (GRETA) approach. The core idea is to dynamically build a GRETA graph that compactly encodes all relevant event trends. Instead of generating all trends first, GRETA incrementally maintains this graph as new events arrive. Aggregates are propagated along the graph's edges using a dynamic programming principle. This allows for the final aggregate to be updated incrementally and returned instantaneously at the end of each query window.
Key methodological contributions include:
- GRETA Graph Construction: A graph structure that represents event trends and their relationships, avoiding explicit trend enumeration.
- Incremental Aggregation Propagation: Aggregates are computed and updated dynamically as the graph is built, rather than in a separate post-processing step.
- Handling Nested Patterns and Negation: The approach can decompose complex patterns with nested Kleene closures and negations into manageable sub-problems, maintaining separate graphs and invalidating events as needed.
- Efficient Data Structures: Optimized runtime data structures (Time Panes, Event Type Hash Tables, Vertex Trees, Window Hash Tables) are employed for efficient event insertion, predecessor lookup, and aggregate maintenance across sliding windows.
- Shared Graph Across Windows: To avoid redundant computations, GRETA shares a single graph structure across overlapping sliding windows, with events maintaining multiple aggregates if they fall into multiple windows.
Datasets
The paper evaluates GRETA using three datasets:
- Stock Real Data Set: Real NYSE transaction records (225k records from 19 companies in 10 sectors). This dataset was replicated 10 times for experiments.
- Linear Road Benchmark Data Set: Generated using a traffic simulator, providing vehicle position reports over 3 hours, reaching up to 4k events/second.
- Cluster Monitoring Data Set: Generated data simulating cluster performance measurements (CPU, memory, load) over 3 hours at a rate of 3k events/second.
The paper also mentions using synthetic data for some analyses.
Key Insights and Ideas
- The "Aha!" Moment: Graph as a Trend Encapsulator: The most significant insight is that a graph can compactly represent all possible event trends matching a query, without explicitly listing them. This graph acts as a compressed representation, enabling efficient aggregation.
- Dynamic Programming on Graphs for Aggregation: Propagating aggregates along graph edges is a powerful way to achieve incremental computation. This avoids recomputing aggregates for common sub-trends, a major bottleneck in prior methods.
- Decoupling Trend Construction and Aggregation: GRETA fundamentally breaks the dependency of aggregation on prior trend construction. This is the key to its performance gains.
- Negation as Event Invalidation: Handling negative sub-patterns by marking events as "invalid" for future connections is an elegant way to prune the search space and improve efficiency.
- Window Sharing for Efficiency: Reusing graph structures across overlapping windows is crucial for handling sliding windows efficiently, preventing redundant computations and memory usage.
Key Results
GRETA demonstrates substantial performance improvements over state-of-the-art systems like Flink, SASE, and CET:
- Speedup: Up to four orders of magnitude faster than two-step approaches.
- Memory Reduction: Up to 50-fold less memory consumption compared to existing methods.
- Time Complexity: Reduced from exponential to quadratic in the number of events per window.
- Space Complexity: Reduced from exponential to linear in the number of events.
- Robustness: GRETA's performance remains stable even with high predicate selectivity, unlike other methods that degrade significantly.
- Scalability: The approach scales well with an increasing number of event trend groups due to its parallel processing capabilities.
Limitations and Future Work
- Complexity of Nested Negation: While GRETA handles nested negation, the paper notes that certain combinations (e.g., negation of Kleene plus) are equivalent to simpler forms, and the approach assumes specific nesting structures for simplicity.
- Event Order Semantics: The paper focuses on "skip-till-any-match" semantics, which is the most flexible but also the most computationally intensive. Extending GRETA to other semantics like "skip-till-next-match" or "contiguous" is mentioned as future work.
- Support for Additional Clauses: The paper briefly discusses how GRETA can be extended to support disjunction and conjunction, but a full implementation and analysis of these extensions would be valuable.
- Concurrency Control: While GRETA uses a time-based transaction model for concurrency control, further exploration of parallel processing for negative sub-patterns could be beneficial.
Summary updated