hybrid rule engines (rulesfest 2010)
TRANSCRIPT
The SkyNet funding bill is passed.
The system goes online on August 4th, 1997.
Human decisions are removed from strategic defense.
SkyNet begins to learn at a geometric rate.
It becomes self-aware at 2:14am Eastern time, August 29th
In a panic, they try to pull the plug.
And, Skynet fights back
Mark ProctorCo-CreatorProject Lead
Topics
Rule engines suck
Hybrid Rule EnginesReaction Rules
Query Rules
Functional Support
Conccurrency and Parallization
Because Not Everyone
Is As Smart As He Is
Fact of Life
Fact of Life
Fact of Life
Rule Engines Suck
Problems
Limitations of expressivenessInability to cleanly say what you want declaratively
Verbosity, Control/Semaphores, Emulation
Execution flow and orderingConflict Resolution is not easy
Modules (Agenda Groups), RuleFlow Groups
Concurrency
AmbiguityRule Recursion
Unwanted rules
Extensibility and Pluggability
Transactions and isolation
Design Patterns
Sequencing
select * from Light l where seq(l.color) { start: "orange" -> "red" -> end } )
(Light seq( (color, category) (start: "orange", "x" -> "green", y -> end ) ) )
Sequencing
select * from Light l where seq(l.color, l.category) { start: "red", "x" -> ("green", "x" || "yellow", "y") -> mid start: "red", "y" -> mid mid: "blue", "z" -> end} )
(Light seq( (color, category) (start: "red", "x" -> ("green", "x" || "yellow", "y") -> mid start: "red", "y" -> mid mid: "blue", "z" -> end) ) )
Life Mission
Life Mission
Life Mission
HMS Suckage Destroyer
Let Me Count the Ways
Let Me Count the Ways
Let Me Count the Ways
Let Me Count the Ways
Archaeology Expedition
The Future
Full Hybrid Enginehttp://community.jboss.org/wiki/DroolsLanguageEnhancements
Nested Objects
Casting Nested Objects
Positional Constraints
POSL - Positional-Slotted Language
Method Calls
Maps and Arrays (Collections)
Collections and XPath like filtering
Free form Expressions
Managed Object Graphs (MOGS)
Nested Patterns and Queries
Queries and Unification
Ontologies and Relations via
Query Based Backward Chaining with POSL
Triples with Hybrid POJO Graph Notation.
Escapes for Dialects
Accumulate Improvements to Support Haskell map/fold/filter and MVEL projection/fold
Otherwise
Branch (Labelled Else)
Rule Execution Groups
Rule Dependency Meta-Rule Language
Parallel Meta-Rule Language
Field Versioning
Logical Closures/OnFalse
Opportunistic Backward Chaining, Lazy Field/Object Values
...
Hybrid Rule Engine
Hyrbid Rule Engine
Rule Based ProgrammingReactive rulesForward Chaining
Production Rules: Drools, Clips, OPSJ, Jess, JRules
Query rulesBackward Chaining
Prolog: Prova, Open Prolog, SWI Prolog, Visual Prolog
Functional Programming Haskell/Lisp
Reactive Rules
Tables
increase balance for AccountPeriod Credits
decrease balance for AccountPeriod Debits
trigger : acc.balance += cf.amount
Creating Views with Triggers
trigger : acc.balance -= cf.amount
trigger : acc.balance += cf.amount
select * from Account acc, Cashflow cf, AccountPeriod apwhere acc.accountNo == cf.accountNo and cf.type == CREDIT cf.date >= ap.start and cf.date = ap.start and cf.date = ap.start and cf.date = ap.start and cf.date 100, stage == STAGE.ACC_END ) then print "sum is + $acc.sum;end
Functional Support
select c, sum(bi.price) tfrom Customer c, BaskteItem biwhere bi.customer == cgroup by c
?c