<!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 mean't emulate the performance advantange, not the behaviour. Btw
it's JBoss Rules, or for shorthand JBossRules/JBRules, think ilog might
get upset if we start calling ourselves JRules :)<br>
<br>
I don't believe that sequential mode in either Advisor of JRules is
aimed at allowing you to specify the fine grained order of each rule
execution, although ofcourse you could do this with salience, instead
its more about fast performance execution - there is no agenda, less
state stored and no support for first order logic - which is a very
common use case for decision based services. As always if you need to
control the execution order of each and every rule, you probably
shouldn't be using a rule engine.<br>
<br>
Mark<br>
Hamu, Dave wrote:
<blockquote
cite="mid:10BE6BF91ACAE14C9444FDCB3D24747C04F23B56@uschd00mx11usr.avnet.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.2900.3059" name="GENERATOR">
<div dir="ltr" align="left"><span class="132204115-11052007"><font
color="#0000ff" face="Arial" size="2">Shahad,</font></span></div>
<div dir="ltr" align="left"><span class="132204115-11052007"></span> </div>
<div dir="ltr" align="left"><span class="132204115-11052007"><font
color="#0000ff" face="Arial" size="2">In addition to using salience,
you would also need to use a semaphore. I am not sure JBoss (Mark P.,
et. al.) have implemented a "sequential mode" which is a feature that
is provided by both JRules and Blaze Advisor (among others); however,
that would be a nice feature to add to the rules engine. It seems that
without massive changes to the product, they could allow a rule-base to
be loaded with a "sequential-mode" property in which case, the RETE
engine would be disabled.</font></span></div>
<div dir="ltr" align="left"><span class="132204115-11052007"></span> </div>
<div dir="ltr" align="left"><span class="132204115-11052007"><font
color="#0000ff" face="Arial" size="2">I'm not really up to speed on
the LEAPS feature and whether it is being obsoleted... </font></span></div>
<div dir="ltr" align="left"><span class="132204115-11052007"></span> </div>
<div dir="ltr" align="left"><span class="132204115-11052007"><font
color="#0000ff" face="Arial" size="2">However, I just read Mark's
response and I respectfully disagree... I believe that you can simulate
sequential processing with salience and a semaphore. Basically, if the
rules in question have a salience order and the working memory is
changed using a semaphore construct, then any subsequent rules beyond
the first rule that fires would not execute. </font></span></div>
<div dir="ltr" align="left"><span class="132204115-11052007"></span> </div>
<div dir="ltr" align="left"><span class="132204115-11052007"><font
color="#0000ff" face="Arial" size="2">So, if I understand the issue
that you have, say that there are many thousands of rules, but you want
them evaluated in a specific order. Once the first rule fires, you can
mark the data as processed and preclude the execution of any additional
rules.</font></span></div>
<div dir="ltr" align="left"><span class="132204115-11052007"></span> </div>
<div dir="ltr" align="left"><span class="132204115-11052007"><font
color="#0000ff" face="Arial" size="2">There may be other issues from a
performance perspective, but ultimately, I think that this workaround
is very doable. </font></span></div>
<div dir="ltr" align="left"><span class="132204115-11052007"></span> </div>
<div dir="ltr" align="left"><span class="132204115-11052007"><font
color="#0000ff" face="Arial" size="2">On the other hand, I applaud
Mark's suggestion to have a member of the JRules community take the
lead on a sequential-mode algorithm for JRules 4.0... I have been a
fan of the Drools/JRules project since the 1.x days and I have witness
this project evolve from an intriguing tool-kit to a impressive product
and I think that your suggestion is fantastic. Providing this
additional feature will further position JRules as a leading contender
in the Business Rules space.</font></span></div>
<div dir="ltr" align="left"><span class="132204115-11052007"></span> </div>
<div dir="ltr" align="left"><span class="132204115-11052007"><font
color="#0000ff" face="Arial" size="2">Regards,</font></span></div>
<div dir="ltr" align="left"><span class="132204115-11052007"></span> </div>
<div dir="ltr" align="left"><span class="132204115-11052007"><font
color="#0000ff" face="Arial" size="2">Dave</font></span></div>
<br>
<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>Shahad
Ahmed<br>
<b>Sent:</b> Friday, May 11, 2007 8:34 AM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<b>Subject:</b> [rules-users] Sequential rules algorithm<br>
</font><br>
</div>
<div>Does anyone know if there's an efficient way of replicating
the Ilog JRules sequential algorithm in Drools?</div>
<div> </div>
<div>From a (over simplified) users perspective, the <font
style="background-color: rgb(255, 255, 0);">JRules </font>sequential
algorithm takes an ordered list of rules and fires the first rule in
the sequence with a valid IF condition. You can also specify a maximum
number of rules in a sequence that may fire. If you have a large number
of simple rules to be fired in sequence (often precondition validating
rules in a complex ruleflow), then the sequential algorithm gives a
significant performance gain over the RETE algorithm in JRules. </div>
<div> </div>
<div>I can see how you might order a set of rules by salience and
give then the same agenda group. Then I assume you will get the
equivalent "behaviour" to the Ilog sequential algorithm described
above. However, before I try this out, I thought I'd ask if anyone has
a view on the performance of this approach; and whether there would be
anything to be gained by adding a similar sequential algorithm to
Drools. </div>
<div> </div>
<div>I've seen a few Blog posts in the past that suggest that the
Ilog sequential algorithm is similar to LEAPS, but I don't know if
that's accurate - also LEAPS will no longer be supported on Drools 4.0
development path. </div>
<div> </div>
<div>Thanks</div>
<div>Shahad</div>
<div> </div>
<div> </div>
<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>