Hi Murilo,<div>Drools Fusion will automatically retract the event if it&#39;s not needed anymore, for example if you are calculating the average using sliding windows, as soon as the event falls out of the sliding windows and don&#39;t match any other rule it will be automatically retracted if Drools is operating in Stream Mode.</div>
<div><br></div><div>About persisting the internal state, you can configure the persistence mechanisms, but in my opinion it will be better if you store using your own mechanisms the average and re initialize the state when you want to start monitoring again.</div>
<div><br></div><div><br></div><div>Cheers<br><br><div class="gmail_quote">On Tue, Sep 20, 2011 at 6:05 PM, Murilo Lima <span dir="ltr">&lt;<a href="mailto:mslima@nic.br">mslima@nic.br</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
I am planning to use Drools Fusion in a monitoring application, but I have<br>
some performance and fault-tolerance issues.<br>
<br>
The idea is to monitor if some measurements are within a parameter defined<br>
on a baseline. The baselines themselves are calculated based on previous<br>
measurements. For example, I want to monitor if a measurement is close to<br>
the average of previous measurements at the same weekday.<br>
<br>
My worry is that the volume of measurements is very high, and I need the<br>
average of the measurements over a long period of time. Clearly, I see that<br>
it would be better to use the average of the whole set of measurements<br>
(instead of the average of a sliding window, or setting an expiration for<br>
the events) and calculate the averages in an online fashion, so as not to<br>
keep the measurements in memory. I want to know if Drools Fusion accumulate<br>
functions work that way, or if I need to retract the events myself.<br>
<br>
Another question is: if, for some reason, I have to stop the monitoring<br>
application, will Drools Fusion automatically keep track of its internal<br>
state? In the previous example, would I have to provide myself a way to save<br>
the averages on disk, or Drools Fusion would take care of it? I didn&#39;t see<br>
anything like that on the documentation.<br>
<br>
<br>
Thanks for any help,<br>
Murilo<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/questions-about-Drools-Fusion-perfomance-tp3353426p3353426.html" target="_blank">http://drools.46999.n3.nabble.com/questions-about-Drools-Fusion-perfomance-tp3353426p3353426.html</a><br>

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>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br> - CTO @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com</a>  <br> - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><div>
- Co-Founder @ <a href="http://www.jugargentina.org" target="_blank">http://www.jugargentina.org</a><br> - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -</div>
<br>
</div>