This is not possible in the public api now, but it seems like this approach would be a
valid thing to add to the internal core of Drools. So that we do parallel compilation,
seamlessly, for all our users. I’m not sure when we’ll have time to do it, although maybe
someone from the community can work with us to do this?
On 8 May 2014, at 10:04, RichardAmbridge <richard.ambridge(a)gmail.com> wrote:
We have over 20000 rules in our drools implementation. In drools 5 we
could build multiple packages in different threads and then create a
Knowledge base joining all those packages together.
knowledgeB = KnowledgeBuilderFactory.newKnowledgeBuilder();
Then in the main compiler, once all threads have finished
KnowledgeBase knowledgeBase =
for each thread:
I can't seem to find anyway to do that with the new KIE implementation.
What I would like to do is something like:
Create sb to have lots of rules
KieServices kieServices = KieServices.Factory.get();
KieFileSystem kfs = kieServices.newKieFileSystem();
KieBuilder kieBuilder = kieServices.newKieBuilder(kfs);
KieContainer kieContainer =
KieBase kieBase = kieContainer.newKieBase(kieBaseConfiguration);
In main compiling, create multiple threads, each with its own rule set.
Then when all threads completed, take all the kieBase objects and merge into
then KieSession ksession=mergedKieBase.newKieSession();
We compile our rules offline and then load into our running servers. The
compile server is a multicore server, but buildAll is single threaded.
Is this possible?
Many thanks for the support,
View this message in context:
Sent from the Drools: User forum mailing list archive at Nabble.com
rules-users mailing list