Myths...
1/ Business users can:
author rules
deploy them
test them
run them
Whithout the help of IT... I have delivered a training for a client who was actually thinking that it was true because the salesman said so... ah ah ah they made my day/mounth/year !!!
Can you seriously think about a company who will take the risk to deploy a service in the back of the IT team?? no way!
You need security as well to prevent me writing a rule stating:
if the name of the client is "Damien" then 100% discount - groovy baby!
The architecture of a project cannot be done by non-technical users
2/ You can manage rule project easily without having to worry about anything.
There is limit of number of rules you can deal with. In theory one could have as many rules as they want but this is not entirely correct.
JRules stop synchronizing rules between Eclipse and RTS from around 3,000 rules.
It will take forever if you have a project with 100,000 rules all in RETE. Building the tree will take a long time. Even in Sequential mode it takes a long time to proceed.
You cannot use a rule repository like the folder "My Documents" and just keep on adding rules.
3/ Business users can write all kind of rules without any training.
Different things:
a/ order of conditions may impact performance.
b/ some rules are complex and need a good understanding of the language
c/ the algorithm used can impact the result of the execution
d/ a single badly written rule can multiply the execution time by n.
I worked on a project where only 1 rule was responsible for some random timeouts.
e/ Some complex problem can be express in one rule.
This problem is solve in one rule and has one result:
There are four Golfers standing at a tea, in a line from left to right.
- The golfer to the Fred’s immediate right is wearing blue pants
- Joe is second in line
- Bob is wearing plaid pants
- Tom isn’t in position one or four, and he isn’t wearing the orange pants
BTW: This is an JBoss example.
How can a business user do this?
4/ Rule engine can do backward chaining
I think JBoss say they can but I am not sure about this. Blaze and JRules cannot.
5/ One doesn't need any programme language to write rules.
Correct, but you will need some to execute the rules. Except if you are using a simple XSD as Object Model. But your Decision Service will not do that much clever thing.
6/ It is slower than JAVA
Of course but by using BRMS you are externalizing the business logic so it has a cost.
Exactly like when you externalize data. The database call has a cost.
I have sent 5,000 objects into the working memory of JRules with a project containing 4 dummy rules which were calling each other... Performance test purpose
Result: 19 Millions rules executed in 75 seconds. Do your maths... it is not that slow.
7/ You can do anything in a rule
Do not make database call in a rule (especially in the conditions). Using Rete, in theory, a rule could "test" the condition to find matching result in the memory thousands of time.
No one want to call a database that much in an application.
Hope it helps