[rules-users] Approach for loading the rules| How to use MultithreadEvaluationOption.YES

Harshit Bapna hrbapna at gmail.com
Tue Oct 12 03:17:31 EDT 2010


Hi All,

1. Is it a good idea to categorize rules, place each category of rules in a
different drl file and load the different drls in a same knowledge base ?

Approaches to loading of rules in the knowledge base:
1. Load different drl files in a single knowledge builder and add the
package to a single knowledge base.
2. Load each drl file in a new knowlegeBuilder and then add the package to a
single knowledge base.
3. Load different knowledge bases for different drl files.

IMO, 1 is better. (Since none of the examples are using multiple drl files
so I asked this question)

2. My drools usage is for rules that requires stateless sessions
    I was thinking of using Sequential Rete.  (
http://blog.athico.com/2007/07/sequential-rete.html)
    Apart from the below two lines of code is there anything which should be
taken care of ?
            KnowledgeBaseConfiguration kbaseConf =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
            kbaseConf.setOption(SequentialOption.YES);//
http://blog.athico.com/2007/07/sequential-rete.html
            // kbaseConf.setOption(MultithreadEvaluationOption.YES);

3. How to achieve Multi Threading in drools for stateless rules? Is there a
way where I can use the inbuilt parallelism (if it supports) ?

    I found an option MultithreadEvaluationOption.YES in the knowledge base
configuration.
    If any sample code or example for multi threaded usage of drools is
available it would be of good help..


--Harshit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101012/41d9c2d2/attachment.html 


More information about the rules-users mailing list