On 8 May 2012 16:04, gboro54 <span dir="ltr"><<a href="mailto:gboro54@gmail.com" target="_blank">gboro54@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Perhaps a blocking queue which has facts put on from other threads, the<br>
thread then inserts x number of facts and fires the rule set?<br></blockquote><div><br>Yes, I'd say that's more like it. <br>
<br>
If these zillions of facts aren't related, they can be processed by disjoint sessions. So, <br>
if you want to feed more than one CPU, run several sessions like that. <br>
<br>
It might be desirable to have small batches of facts inserted and processed by a single<br>
call. You should know whether there is a way to do that... <br><br>-W<br><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
gboro54 wrote<br>
<div><div class="h5">><br>
> The point is to be able to stream a large volume of messages into the rule<br>
> session without tying up that thread. In addition I don't want there to be<br>
> millions of messages in a session at a given point, thus the point of<br>
> executing the rules on a different thread while inserting facts from<br>
> another.<br>
><br>
><br>
> laune wrote<br>
>><br>
>> What about executing insert(s) followed by fireAllRules() in one thread?<br>
>> -W<br>
>><br>
>> On 08/05/2012, gboro54 &lt;gboro54@&gt; wrote:<br>
>>> What do you recommend? firUntilHalt seems to get locked out after<br>
>>> sometime... I am running out of ideas and have posted this question<br>
>>> before.<br>
>>> I believe we talked about periodically using fireAllRules on a separate<br>
>>> thread.<br>
>>><br>
>>><br>
>>> laune wrote<br>
>>>><br>
>>>> Periodically calling fireAllRules() in a thread running parallel to the<br>
>>>> one(s)<br>
>>>> doing insertions doesn't make sense to me.<br>
>>>><br>
>>>> -W<br>
>>>><br>
>>>> On 08/05/2012, gboro54 &lt;gboro54@&gt; wrote:<br>
>>>>> I am not currently using agenda-groups. I believe my issue right now<br>
>>>>> is<br>
>>>>> one<br>
>>>>> of thread safety. A little background: I currently have a thread<br>
>>>>> pulling<br>
>>>>> messages from a database running on the main thread. In several other<br>
>>>>> threads, I have drools session being fired every so often. It appears<br>
>>>>> that<br>
>>>>> there may be a some type of deadlock caused by invoking fireAllRules<br>
>>>>> on<br>
>>>>> one<br>
>>>>> thread, while another is trying to insert. I am working through right<br>
>>>>> now<br>
>>>>> to<br>
>>>>> debug the issue. Has anyone else experienced this issue?<br>
>>>>><br>
>>>>><br>
>>>>> Vincent Legendre wrote<br>
>>>>>><br>
>>>>>>> I am having an issue where I have a catch all<br>
>>>>>>> retraction rule setup as the lowest salience.<br>
>>>>>><br>
>>>>>> Not sure to understand that (note that I am not english native ...)<br>
>>>>>><br>
>>>>>>> I see activations created for the facts but they are never fired.<br>
>>>>>>> Any<br>
>>>>>>> thoughts on why this may happen?<br>
>>>>>><br>
>>>>>> Send some rules. Activations never fired is just too vague to have a<br>
>>>>>> single answer.<br>
>>>>>> If you use agenda groups, may be that the group is simply not on<br>
>>>>>> focus<br>
>>>>>> ...<br>
>>>>>><br>
>>>>>> Add a first rule that set the focus, or set auto-focus for all your<br>
>>>>>> "low<br>
>>>>>> salience" rules, or don't set agenda group for them (their group will<br>
>>>>>> be<br>
>>>>>> the MAIN group).<br>
>>>>>><br>
>>>>>>> The session is run on a separate thread with fireAllRules called<br>
>>>>>>> every<br>
>>>>>>> 1/2<br>
>>>>>>> second. I have tried syncronizing inserts on the session so that<br>
>>>>>>> thread<br>
>>>>>>> would not be in the middle of firing when new facts come in but that<br>
>>>>>>> does<br>
>>>>>>> not seem to do anything....<br>
>>>>>><br>
>>>>>> Why not using fireUntilHalt instead ?<br>
>>>>>> Run your session.fireUntilHalt in a separate thread, and insert<br>
>>>>>> things<br>
>>>>>> in<br>
>>>>>> that session.<br>
>>>>>> insert (or update or retract) will wake up the session.<br>
>>>>>><br>
>>>>>> Of course, one day, you have to call halt() on your session to get<br>
>>>>>> out.<br>
>>>>>> _______________________________________________<br>
>>>>>> rules-users mailing list<br>
>>>>>> rules-users@.jboss<br>
>>>>>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>>>>>><br>
>>>>><br>
>>>>><br>
>>>>> --<br>
>>>>> View this message in context:<br>
>>>>> <a href="http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971147.html" target="_blank">http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971147.html</a><br>
>>>>> Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
>>>>> _______________________________________________<br>
>>>>> rules-users mailing list<br>
>>>>> rules-users@.jboss<br>
>>>>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>>>>><br>
>>>> _______________________________________________<br>
>>>> rules-users mailing list<br>
>>>> rules-users@.jboss<br>
>>>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>>>><br>
>>><br>
>>><br>
>>> --<br>
>>> View this message in context:<br>
>>> <a href="http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971245.html" target="_blank">http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971245.html</a><br>
>>> Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
>>> _______________________________________________<br>
>>> rules-users mailing list<br>
>>> rules-users@.jboss<br>
>>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>>><br>
>> _______________________________________________<br>
>> rules-users mailing list<br>
>> rules-users@.jboss<br>
>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>><br>
><br>
<br>
<br>
--<br>
</div></div>View this message in context: <a href="http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971415.html" target="_blank">http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971415.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto: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></div></blockquote></div><br>