Rete Rule Engine Sequential Mode Stateless Processing

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improverule evaluation capabilityVSAvoidmemory usage
Core Design Contradiction:
ReliabilityVSQuantity of substance

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.

Inventive Principle:
Principle #2Taking out (Extraction)

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.

Inventive Principle:
Principle #1Segmentation

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

Engineering Contradiction:
Improveactivation order controlVSAvoidconflict resolution mechanism
Core Design Contradiction:
Ease of operationVSDevice complexity

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.

Inventive Principle:
Principle #13The other way round (Inversion)

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.

Inventive Principle:
Principle #2Taking out (Extraction)

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

Engineering Contradiction:
Improveprocessing speedVSAvoidthread synchronization mechanism
Core Design Contradiction:
ProductivityVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS8315967B2Sequential mode in a Rete rule engine
Publication Date: 2012.11.20 RED HAT INC
  • US8315967B2 patent drawing
  • US8315967B2 patent drawing
  • US8315967B2 patent drawing

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.