Augmented Finite Automaton Code Generation for High-Throughput Stream Pattern Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current systems face challenges in detecting complex patterns in data streams with high throughput, as relational-style streaming logic struggles to identify patterns efficiently and real-time pattern detection is expensive, limited to less than a million events per second.
Innovation Solution
Generating code specific to an augmented finite automaton (AFA) that leverages latency-aware batching, grouped execution, columnar data organization, and customized dynamic code generation, allowing for efficient pattern detection in data streams through a language-integrated application programming interface (API).
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If relational-style streaming logic is used for pattern detection, then the system can handle simple patterns, but it struggles to detect complex patterns efficiently
Solution Approach 1:
The patent replaces traditional relational-style streaming logic (mechanical system) with a vectorized execution model that processes data in parallel batches. This substitution enables complex pattern detection while achieving high throughput by leveraging SIMD (Single Instruction, Multiple Data) operations and avoiding sequential row-by-row processing that limits relational approaches.
Solution Approach 2:
The patent segments the data stream into batches that can be processed independently and in parallel. By dividing the continuous stream into discrete vectorizable batches, the system can apply vectorized operations to multiple events simultaneously, thereby detecting complex patterns at high speeds without the sequential bottlenecks of relational processing.
2Productivity
If in-memory relational-style queries are used, then throughputs close to memory-bandwidth can be achieved, but real-time pattern detection remains expensive and limited to less than a million events per second
Solution Approach 1:
The patent substitutes expensive row-by-row relational evaluation with efficient vectorized computation. By representing pattern matching operations as vector operations that can be executed in parallel using CPU vector units (AVX, NEON), the system achieves both high throughput and low cost, overcoming the fundamental limitation of relational engines that process events sequentially despite having fast memory access.
Solution Approach 2:
The patent changes the fundamental parameter of processing granularity from individual rows to vector batches. This parameter change allows the system to process thousands of events in a single instruction cycle, transforming the computational model from sequential (relational) to parallel (vectorized), thereby reducing the cost per event while maintaining memory-bandwidth utilization.
3Adaptability or versatility
If generic pattern matching code is used, then the system can handle various patterns, but it cannot achieve optimal performance for specific pattern types
Solution Approach 1:
The patent implements dynamic code generation that adapts the vectorized execution plan based on the specific pattern specification. Instead of using a fixed generic algorithm, the system analyzes the pattern at runtime and generates optimized vector operations tailored to that pattern's characteristics, achieving both versatility in handling different patterns and optimal performance for each specific pattern type.
Data Source
AI summary
An intermediate representation of a workflow of one or more modules may be generated to decouple language implementations of the one or more modules. In response to receiving a workflow of one or more modules, the workflow may be analyzed to determine an optimal implementation language for each of the one or more modules to thereby reduce effects of data marshalling. An intermediate representation of the workflow that is configured to decouple any implementation languages associated with the one or more modules may be generated. To allow for decoupling, the intermediate representation may be written in a declarative language. The generated intermediate representation may then be compiled to generate an executable program that corresponds to the workflow and is implemented in the determined optimal language for each of the one or more modules.


