<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I've thought about some callback mechanism that is executed when a rule
is no longer true, the problem I have is which variable changed to make
the rule no longer true and how do I expose the bound variables to the
user, especially if the rule is no longer true due to a retraction,
and ofcourse I need to figure our the DRL syntax that makes sense. <br>
<br>
I've thought about doing it as a sort of logical closure, so you have
to declare the data:<br>
insertLogicalClosure( new LogicalClosure() {<br>
execute() {.......}<br>
} )<br>
<br>
Not sure how to make the data accessible, maybe the user should have to
populate the map. Anyway idea is in the same way that a logical insert
is executed when the rule is true, the logical closure/method is
executed.<br>
<br>
So if someone has some time and fun, maybe they would work on this and
submit a patch :)<br>
<br>
Mark<br>
<br>
Anstis, Michael (M.) wrote:
<blockquote
cite="mid:6CE83AFC8500B641AE00AC1674A3B4AC06C56924@eu1wam08.warley.ford.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.2900.3314" name="GENERATOR">
<div dir="ltr" align="left"><span class="764482907-29072008"><font
color="#0000ff" face="Arial" size="2">Do you use a stateful session?</font></span></div>
<div dir="ltr" align="left"><span class="764482907-29072008"></span> </div>
<div dir="ltr" align="left"><span class="764482907-29072008"><font
color="#0000ff" face="Arial" size="2">Are your measurements before and
after you've inserted facts into working memory?</font></span></div>
<div dir="ltr" align="left"><span class="764482907-29072008"></span> </div>
<div dir="ltr" align="left"><span class="764482907-29072008"><font
color="#0000ff" face="Arial" size="2">Would be helpful to the group to
post your use-case source?</font></span></div>
<div dir="ltr" align="left"><span class="764482907-29072008"></span> </div>
<div dir="ltr" align="left"><span class="764482907-29072008"><font
color="#0000ff" face="Arial" size="2">Thanks,</font></span></div>
<div dir="ltr" align="left"><span class="764482907-29072008"></span> </div>
<div dir="ltr" align="left"><span class="764482907-29072008"><font
color="#0000ff" face="Arial" size="2">Mike</font></span></div>
<br>
<blockquote dir="ltr" style="margin-right: 0px;">
<div class="OutlookMessageHeader" dir="ltr" align="left"
lang="en-us">
<hr tabindex="-1"> <font face="Tahoma" size="2"><b>From:</b>
<a class="moz-txt-link-abbreviated" href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>
[<a class="moz-txt-link-freetext" href="mailto:rules-users-bounces@lists.jboss.org">mailto:rules-users-bounces@lists.jboss.org</a>] <b>On Behalf Of </b>Roger
Tanuatmadja<br>
<b>Sent:</b> 29 July 2008 02:12<br>
<b>To:</b> Rules Users List<br>
<b>Subject:</b> [rules-users] Measuring Drools Memory Usage<br>
</font><br>
</div>
<div>Hi, </div>
<div> </div>
<div>Has anyone attempted to measure the incremental memory usage
of using Drools? Anyone cares to share their methodology?</div>
<div> </div>
<div>I am currently following the following methodology:</div>
<div>1. Prevent garbage collection from happening by using
large Xms Xmx (1024m in my case), a NewRatio of 2 (I am sure other
sizes will work as well) and verbogegc enabled to confirm that no
garbage collection is happening.</div>
<div>2. Use Runtime.freeMemory before and after fireAllRules and
measuring the difference. </div>
<div> </div>
<div>The problem with my methods so far has been that after a
positive memory usage (indicating you are using memory), subsequent use
case (the same one) incurs zero memory usage which is very strange. </div>
<div> </div>
<div>So I guess my question is 2 fold: anyone care to share their
methodology, and can anyone see what's wrong with mine?</div>
<div> </div>
<div>Thanks,</div>
<div> </div>
<div>Roger</div>
</blockquote>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>