You could always have a pool of StatefulSessions that you reuse. (This would 
allow you to run concurrently in multiple threads as well.)  As long as these 
billions of facts don't need to interact that'll work fine.  However I'd 
suggest that you try the "rule latch" method that Thomas suggested.  That way 
you could tune the number of data objects you insert into a single pooled 
session, instead of inserting one at a time.  And I'm guessing that, no matter 
how efficient you get, throwing 2 billion in memory at once won't scale. :)

--- On Thu, 7/22/10, tom ska <[email protected]> wrote:

From: tom ska <[email protected]>
Subject: Re: [rules-users] Problem with DRL language/ XLS decision tables.
To: "Rules Users List" <[email protected]>
Date: Thursday, July 22, 2010, 9:17 AM

Hi,
thanks for so quick answer. I think, that using StatelessSession could be a 
solution, but as I understood, I have to insert only one fact to the facts 
base. But, I have about 2 billions of facts that I want to process with Drools, 
and execution time, is for me really important. A think, that inserting one 
fact at time means for me additional time to initialise engine (when adding a 
new fact, and removing old one). Am I right?


Thanks :)

2010/7/22 Pavel Tavoda <[email protected]>

Don't know details of your problem but it's typical situation where

you can use StatelessSession, insert one fact at time and use

activation-group.



Pavel



2010/7/22 tom ska <[email protected]>:

> Hello,

> I have a problem with defining rules. I insert many, many objects (facts) to

> ksession object (StatefulKnowledgeSession). I want to fire rules for all of

> them(facts), but I want to fire only one rule from all rules for each one

> fact(not always this same rule is fired, because I use salience).

> activation-group is not appropriate, because it works only with one object

> (fact) - rest is not processed by engine.

> Second question is: how can I stop processing rules, bot only for one fact,

> not for all of them.

>

> Thanks,

> tom.

>

> P.S. forgive me my English... :)

> P.S.2 Firstly I want to do this in DRL, then, I'll try with XLS, and write

> post if I would find problems...

>

>

>

> _______________________________________________

> rules-users mailing list

> [email protected]

> https://lists.jboss.org/mailman/listinfo/rules-users

>

>

_______________________________________________

rules-users mailing list

[email protected]

https://lists.jboss.org/mailman/listinfo/rules-users




-----Inline Attachment Follows-----

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users



      
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to