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