[rules-users] Activation Firing slow on many events with timer attribute in rule (Drools Fusion)

Philipp Herzig pherzig at googlemail.com
Mon Jan 30 09:07:30 EST 2012


Sure, here it is. Sorry for any inconvienience!

rule "new_intent"
timer (20s)
when
     $evt : EventObject(data['type']=='create') from entry-point eventstream
     not ( EventObject(data['type']=='delete',
data['mrid']==$evt.data['mrid'], data['userid']==$evt.data['userid'])
from entry-point eventstream)
then
 SomeAPI.getInstance().doSomething();
end


Thank you,

Philipp




2012/1/30 Michael Anstis <michael.anstis at gmail.com>
>
> It's going to help (probably) if you include the definition of your rule (or rules).
>
> 2012/1/30 Philipp Herzig <pherzig at googlemail.com>
>>
>> Dear Community,
>>
>> Drools is pretty fast regarding all my use cases. However, today I have found a problem where I cannot find any solution. Hopefully someone of you can help.
>>
>> 1. I have a rule with a @timer(10s) attribute (should be 24h later on but doesn't matter). This rule is activated when a "create" event occurs and invalidated once a "delete" event occurs within the timeframe of @timer.
>>
>> 2. I have approx. 9000 "create" events which are bulk loaded into the working memory and creating activations for the rule above.
>>
>> 3. I have approx. 2000 "delete" events which are bulk loaded into my entry-point cancelling the respective activations from step (2)
>>
>> 4. After the timer expired, the first activation is fired correctly. However, all other activations are fired with some noticeable delay (actually it needs 20-30minutes until all activations are fired).
>>
>>
>> Do you have an idea what the problem with the timer might be? Unfortunately, I have neither an idea how the scheduler in the background works nor which class I should start looking at.
>>
>> BTW: For testing purpose I switched step (2) & (3), that is, "delete" events are inserted before the "create" events and removed the timer attribute which is obviously the same logic. It performs lightning fast in this case... (all remaining activations are fired within 5 seconds). However, insertinging my "delete" events before the "create" events is ok for testing but not feasible in practice.
>>
>> It would be great if some of you has an idea or point to start within the code.
>>
>> Thanks in advance,
>>
>> Philipp
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



--
--------------------------------------------
Philipp Herzig, M.Sc.

Mail: pherzig at googlemail.com
Cell: 0178 - 6156244




More information about the rules-users mailing list