Cloud Rule Inference Engine Loop Detection and Recovery
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Production rule systems in cloud services are susceptible to errors caused by endless loops and excessive data storage, leading to performance issues and potential system unresponsiveness, especially in multi-tenant environments where resource overconsumption can impact other users.
Innovation Solution
A method comprising four phases: Detect, Block, Correct, and Recover, where a detection mechanism identifies loops and fact limits, blocks resource-intensive rule executions, allows designers to correct the issues, and then recovers the system, ensuring the inference engine operates within safe parameters.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If the production rule system allows unrestricted rule execution in a multi-tenant cloud environment, then system versatility and user freedom are improved, but system stability and performance isolation deteriorate due to potential endless loops and resource overconsumption
Solution Approach 1:
The system performs preliminary detection of endless loops by tracking rule execution sequences and identifying when the same rule triggers itself indirectly through other rules. This preventive detection occurs before resource exhaustion can occur, allowing the system to block problematic rule executions and maintain stability while still permitting unrestricted rule definition by users.
2Productivity
If the system executes rules iteratively to process complex business logic, then processing completeness is improved, but the risk of endless loops and excessive resource consumption increases
Solution Approach 1:
The system implements feedback mechanisms that monitor rule execution throughout the iterative process. When a rule is triggered, the system tracks the execution sequence and checks for loops by comparing against previously executed rule sequences. This continuous feedback allows the system to maintain iterative processing for complete business logic execution while detecting and blocking endless loops that would cause resource exhaustion.
3Productivity
If the system processes all triggered rules to ensure comprehensive business logic execution, then processing thoroughness is improved, but performance isolation between tenants deteriorates
Solution Approach 1:
The system extracts and isolates problematic rule executions that create endless loops or excessive resource consumption. By detecting these problematic patterns and blocking them individually, the system removes the harmful elements from the overall processing flow. This allows comprehensive processing of legitimate rules to maintain thoroughness while isolating and preventing the performance-impacting behaviors that would otherwise affect other tenants.
Data Source
AI summary
An endless loop in an inference engine processing a set of rules according to facts stored in a database may be detected by: (a) analyzing the set of rules to identify a subset of the set of rules comprising rules that are triggered by an updated fact; (b) executing the rules of the subset; (c) updating at least one of the facts based on the execution of the rules; (d) storing an identifier for each executed rule of the subset; (e) associating each stored identifier with a subset number for the subset in a consecutive sequence of subset numbers for executed subsets; and repeating steps (a)-(e) until the identifier for a rule, to be executed, is associated with an excessive number of subset numbers that are equally offset from each other in the sequence of subset numbers for executed subsets.


