Incremental User-Defined Aggregation in Data Stream Management
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing data stream management systems (DSMS) are limited in their ability to support user-defined aggregations, allowing only built-in aggregations like SUM, COUNT, and AVG, and do not allow query plans to be changed once processing begins, restricting real-time adaptability and flexibility in processing data streams.
Innovation Solution
A DSMS is implemented to accept user-defined aggregations, allowing incremental computation and storage of information between invocations, enabling the creation of new aggregations during normal operation, and supporting incremental invocation through specific commands and metadata management, allowing user-defined aggregations to be integrated into continuous queries.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If only built-in aggregations are supported in DSMS, then system simplicity is maintained, but adaptability and versatility are limited
Solution Approach 1:
The system provides a universal framework that supports both built-in aggregations and user-defined aggregations through a common interface. The aggregation operator is designed to handle multiple types of aggregations (sum, count, average, and custom user-defined aggregations) using the same execution mechanism, allowing the system to perform multiple functions without requiring separate processing paths for each aggregation type.
Solution Approach 2:
The system segments the aggregation functionality into distinct components: the aggregation operator that processes data streams, the incremental computation engine that handles updates, and the metadata management system that stores aggregation definitions. This segmentation allows user-defined aggregations to be added as separate, modular components without complicating the core data processing engine.
2Adaptability or versatility
If query plans are fixed after processing begins, then system stability is maintained, but real-time adaptability is reduced
Solution Approach 1:
The query plan becomes dynamic rather than static. The system allows query plans to be modified during execution through the addition of new user-defined aggregations. When a new aggregation is defined, the system dynamically updates the execution plan by creating new operator instances and integrating them into the existing data flow, enabling real-time adaptability while maintaining system stability through controlled modification mechanisms.
Solution Approach 2:
The system maintains continuous processing of data streams while allowing query plans to evolve. Incremental computation ensures that when query plans are modified to include new aggregations, the system continues processing without interruption, using the incremental update mechanism to seamlessly integrate new aggregation logic into the ongoing data flow processing.
3Productivity
If full recomputation is performed for aggregations, then accuracy is ensured, but processing efficiency decreases
Solution Approach 1:
The system performs preliminary computation by maintaining incremental state information as data flows through the stream. Instead of waiting until the end to compute aggregations, the system continuously updates aggregation results incrementally as each data element arrives, storing intermediate results that can be quickly adjusted when new aggregations are added or when data windows are updated, thereby avoiding full recomputation.
Solution Approach 2:
The system changes the computation parameter from batch processing to incremental processing. By using incremental computation, the system processes data in small steps as it arrives, updating aggregation results incrementally rather than performing full recomputation. This parameter change enables the system to maintain accuracy while significantly reducing processing time and resource consumption.
4Adaptability or versatility
If user-defined aggregations are added during operation, then flexibility is improved, but system complexity increases
Solution Approach 1:
The system introduces metadata as an intermediary layer between user-defined aggregations and the execution engine. When users define new aggregations, they are first registered in the metadata repository with their definitions and parameters. The metadata management system then translates these high-level definitions into executable operator configurations, shielding the execution engine from the complexity of user-defined aggregation variations and simplifying the integration process.
Data Source
AI summary
A computer is programmed to accept a command for creation of a new aggregation defined by a user to process data incrementally, one tuple at a time. One or more incremental function(s) in a set of instructions written by the user to implement the new aggregation maintain(s) locally any information that is to be passed between successive invocations, to support computing the aggregation for a given set of tuples as a whole. The user writes a set of instructions to perform the aggregation incrementally, including a plus function which is repeatedly invoked, only once, for each addition to a window of a message. The user also writes a minus function to be invoked with the message, to return the value of incremental aggregation over the window after removal of the message. In such embodiments, the computer does not maintain copies of messages in the window for use by aggregation function(s).


