I have been reading an article about Drools performance ( JBoss Drools – Performance and Memory Internals ) , it explains how Rete trees and nodes are created, how Drools indexes them, and why increasing number of objects in Drools hardly effects the total time taken to execute it. Rules, written in intelligent way can drastically reduce the number of nodes in the Rete Tree, thus, further increasing the performance.
I would like to know if there is a Drools rules writing best practice, so I can write them in a way that they could be executed as fast as possible.
Thanks.
Preparing data before calling insert() would give you better performance. Converting drl/xls is done by KnowledgeBuilder for the first time. KnowledgeBase will be cached in an application so it wouldn't be a bottle-neck. Drools 5 evaluates rule condition during the insert stage (ksession.
To associcate a Customer with rules you need: class Customer { private String name; private List<String> rules; //... } So you are saying to create agenda for each customer and fire the rules based on agenda...
DRL (Drools Rule Language) rules are business rules that you define directly in . drl text files. These DRL files are the source in which all other rule assets in Business Central are ultimately rendered.
I can list a few...
House ( windowOpen == true )
not House ( windowOpen )
salience
, in most cases it leads to maintenance hell.It is of course not complete, just my 2 cents...
I have very recently started working on the same, so may be I not the perfect person to answer this question, but yet,
if-statements
inside the then partIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With