-
Notifications
You must be signed in to change notification settings - Fork 8
What is Rule Engine?
Cask Distributed Rules Engine is a Rule Engine or a Production Rule System that uses the rule-based approach to implement an Expert System. Expert Systems are knowledge-based systems that use knowledge representation to process acquired knowledge into a knowledge base that can be used for reasoning.
A Production Rule System is Turing complete with a focus on knowledge representation to express propositional and first-order logic in a concise, non-ambiguous and declarative manner.
The brain of a Production Rules System is an Inference Engine that can scale to a large number of rules and facts. The Inference Engine matches facts and data against Production Rules – also called Productions or just Rules – to infer conclusions which result in actions.
A Production Rule is a two-part structure that uses first-order logic for reasoning over knowledge representation. A business rule engine is a software system that executes one or more business rules in a runtime production environment.
A Rule Engine allows you to define “What to Do” and not “How to do it.”
Rules are pieces of knowledge often expressed as, "When some conditions occur, then do some tasks."
When
<Condition is true>
Then
<Take desired Action>
The most important part of a Rule is its when part. If the when part is satisfied, the then part is triggered.
rule <Rule Name>
When <Condition is TRUE>
Then
<Take Action 1>
<Take Action 2>
...
<Take Action N>
}
}
The process of matching the new or existing facts against Production Rules is called Pattern Matching, which is performed by the Inference Engine. There are a number of algorithms used for Pattern Matching including:
- Linear
- Rete
- Treat
- Leaps
YARE currently implements Linear Algorithm for pattern matching, but, there is an effort in progress to implement Rete Algorithm.
Logical grouping of Rules is called a Rulebook. Rules are the knowledge-base, but Rulebook are more of concept over the Rule to group them into Logical sets. E.g. Rulebook for handling PII data -- will contain all the rules associated with masking, encrypting fields of your data.
A Rulebook, provides a reference to collection of rules in addition to other metadata that is associated with the Rulebook like user who is building the Rulebook, etc.
Cask DRE: A business rule engine for your big data needs.