Rete Rule Engine Sequential Mode Stateless Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional Rete rule engines are inefficient in stateless applications due to unnecessary memory usage and complex conflict resolution mechanisms, and they are difficult to exploit with multiple threads due to simultaneous reads and writes, which can be costly to manage with locks.
Innovation Solution
Configuring the Rete rule engine into a sequential mode where rules are evaluated in a stateless manner by disconnecting left node memories, using a sequential array to manage activations, and ensuring reads and writes occur at different times to facilitate parallel processing.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If conventional Rete rule engine uses memory to store Objects and Tuples during propagation, then rule evaluation can be performed, but memory usage becomes excessive for stateless applications
Solution Approach 1:
The patent extracts and removes the left-input memory component from the Rete network nodes, retaining only the right-input memory for storing Objects. This extraction eliminates the unnecessary memory usage in stateless applications while preserving the essential rule evaluation capability through the modified propagation mechanism.
Solution Approach 2:
The patent segments the rule evaluation process into two distinct phases: first propagating Objects to the right-input, then propagating Tuples to the left-input. This segmentation allows memory to be allocated only when needed for each phase, reducing overall memory requirements compared to maintaining memory structures for both phases simultaneously.
2Ease of operation
If conventional Rete rule engine implements conflict resolution mechanism with priority queue, then activation order can be controlled, but system complexity and processing time increase
Solution Approach 1:
Instead of using a priority queue to determine activation order (conventional approach), the patent inverts the approach by using a simple array indexed by rule sequence number. Rules are executed in the order they were added to the system, eliminating the need for complex priority management while maintaining predictable activation order.
Solution Approach 2:
The patent extracts and removes the priority queue data structure and conflict resolution logic from the Rete engine, replacing it with a simple sequential array-based approach. This extraction eliminates unnecessary complexity while preserving the ability to control activation order through rule registration sequence.
3Productivity
If multiple threads are used to process Rete rule engine, then processing speed can be increased, but simultaneous reads and writes cause race conditions requiring locks
Solution Approach 1:
The patent segments the rule processing into independent phases: Object propagation phase and Tuple propagation phase. By separating these phases and using a command queue to coordinate access, multiple threads can process different parts of the Rete network simultaneously without race conditions, eliminating the need for locks while maintaining parallel processing capability.
Data Source
AI summary
Some embodiments of a sequential mode in a Rete rule engine have been presented. In one embodiment, a Rete rule engine is configured to enter into a sequential mode. Using the Rete rule engine configured, a rule set having a set of rules is evaluated against a set of data objects in a stateless manner.


