Correction... I inadvertantly stated Drools/JRules in my previous e-mail
when I meant to say Drools/JBRules...

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Shahad Ahmed
Sent: Friday, May 11, 2007 9:58 AM
To: Rules Users List
Subject: Re: [rules-users] Sequential rules algorithm


Dave,
 
Thanks for the suggestions. I think giving each rule in the sequence the
same activation-group (I may have incorrectly said agenda-group in my
original email) would be a bit like the semaphore you described. When
one rule in an activation-group fires then all the other rules in the
group are disabled. I'll give this a try and see what the performance is
like. 
 
I'm actively looking into what would be involved in adding a sequential
mode to Drools. I've been using commercial rules engines like Ilog
JRules in various projects for a couple of years, but the latest
addition to Drools such as a BRMS and Ruleflow (with GUI) has definitely
made me take Drools much more seriously as a "contender" in the business
rules space. 
 
Regards,
Shahad
 
 
On 5/11/07, Hamu, Dave <[EMAIL PROTECTED]> wrote: 

        Shahad,
         
        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. 
         
        I'm not really up to speed on the LEAPS feature and whether it
is being obsoleted... 
         
        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.  
         
        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. 
         
        There may be other issues from a performance perspective, but
ultimately, I think that this workaround is very doable.  
         
        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. 
         
        Regards,
         
        Dave

________________________________

        From: [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ] On Behalf Of Shahad Ahmed
        Sent: Friday, May 11, 2007 8:34 AM
        To: [email protected]
        Subject: [rules-users] Sequential rules algorithm
        
         
        
        Does anyone know if there's an efficient way of replicating the
Ilog JRules sequential algorithm in Drools?
         
        From a (over simplified) users perspective, the JRules
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. 
         
        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. 
         
        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. 
         
        Thanks
        Shahad
         
         

        _______________________________________________
        rules-users mailing list
        [email protected] 
        https://lists.jboss.org/mailman/listinfo/rules-users
        
        


_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to