<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">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. :)<br><br>--- On <b>Thu, 7/22/10, tom ska <i><tiberium.linux@gmail.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: tom ska <tiberium.linux@gmail.com><br>Subject: Re: [rules-users] Problem with DRL language/ XLS decision
tables.<br>To: "Rules Users List" <rules-users@lists.jboss.org><br>Date: Thursday, July 22, 2010, 9:17 AM<br><br><div id="yiv1553734804">Hi,<br>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?<br>
<br>Thanks :)<br><br><div class="gmail_quote">2010/7/22 Pavel Tavoda <span dir="ltr"><<a rel="nofollow" ymailto="mailto:pavel.tavoda@gmail.com" target="_blank" href="/mc/compose?to=pavel.tavoda@gmail.com">pavel.tavoda@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Don't know details of your problem but it's typical situation where<br>
you can use StatelessSession, insert one fact at time and use<br>
activation-group.<br>
<br>
Pavel<br>
<br>
2010/7/22 tom ska <<a rel="nofollow" ymailto="mailto:tiberium.linux@gmail.com" target="_blank" href="/mc/compose?to=tiberium.linux@gmail.com">tiberium.linux@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Hello,<br>
> I have a problem with defining rules. I insert many, many objects (facts) to<br>
> ksession object (StatefulKnowledgeSession). I want to fire rules for all of<br>
> them(facts), but I want to fire only one rule from all rules for each one<br>
> fact(not always this same rule is fired, because I use salience).<br>
> activation-group is not appropriate, because it works only with one object<br>
> (fact) - rest is not processed by engine.<br>
> Second question is: how can I stop processing rules, bot only for one fact,<br>
> not for all of them.<br>
><br>
> Thanks,<br>
> tom.<br>
><br>
> P.S. forgive me my English... :)<br>
> P.S.2 Firstly I want to do this in DRL, then, I'll try with XLS, and write<br>
> post if I would find problems...<br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> rules-users mailing list<br>
<div class="im">> <a rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="/mc/compose?to=rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
</div><div class="im">> <a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
><br>
><br>
</div>_______________________________________________<br>
rules-users mailing list<br>
<div class="im"><a rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="/mc/compose?to=rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
</div><div><div></div><div class="h5"><a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>rules-users mailing list<br><a ymailto="mailto:rules-users@lists.jboss.org" href="/mc/compose?to=rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></div></blockquote></td></tr></table><br>