[rules-users] Identify Rule on Attributes

Greg Barton greg_barton at yahoo.com
Mon Mar 16 11:36:50 EDT 2009


Of course there will be performance issues. :)  There are always performance issues.  But the whole point of the rete algorithm is to address some performance issues, specifically those created by needing to select the next rule to fire based on how your data changed.  

100k rules is a lot, but certainly within the capabilities of a rete based system.  One factor that would make that many rules easier to handle would be how homogeneous their conditions are.  Do the rules share many condition elements?  But in general systems of that size that need to deal with that many rules simultaneously are sequential. (i.e. they don't react to modification of the data)

Usually, though, you would not place 100k rules in one set.  As a rule of thumb, you place rules in one set if they have tight interaction. i.e. The firing of one rule generally triggers the firing of another.  This leads to rulesets that are formed around subject area, type of data processing, or stage of data processing.  Just from an application architecture standpoint, it probably wouldn't make sense to have that many rules all active at once.  

To form sets you basically have to ask this question for each rule: after this rule fires, what other rules will most likely fire?  Do that iteratively and add the resulting rules to a set.  Once the set stops growing you've probably found a good ruleset.

Also, there's no reason why you can't have a set of rules that decides what other rulesets should be routed to and/or loaded.  Drools also has many constructs not included in the original rete algorithm for deciding whether rules should fire: no-loop, agenda-group, etc.

Food for thought...

--- On Mon, 3/16/09, Nikhil_dev <k.nikhil at verchaska.com> wrote:

> From: Nikhil_dev <k.nikhil at verchaska.com>
> Subject: RE: [rules-users] Identify Rule on Attributes
> To: rules-users at lists.jboss.org
> Date: Monday, March 16, 2009, 12:24 AM
> As you guys have suggested to combine all the rule base into
> one then for
> example(one which i have already mentioned)
> i will combine Rule1 , rule 2 and rule3 into 1 rule base
> then, when i pass
> the variables to the rulebase who will i come to know which
> rules were
> executed.
> things i would like to know if i am going to execute this
> idea, the number
> of rules that i will using say around 100000, is it
> advisable to include all
> of them in to 1 rulebase!!! 
> will there be any performance issues.
> 
> 
> 
> Anstis, Michael (M.) wrote:
> > 
> > Furthermore a rulebase can contain rules from many
> resources (e.g.
> > DRL's).
> > 
> > So I guess the cause of your pain is why do you need
> multiple
> > rulebases!??! 
> > 
> > -----Original Message-----
> > From: rules-users-bounces at lists.jboss.org
> > [mailto:rules-users-bounces at lists.jboss.org] On Behalf
> Of Scott Reed
> > Sent: 13 March 2009 14:41
> > To: Rules Users List
> > Subject: Re: [rules-users] Identify Rule on Attributes
> > 
> > A RuleBase can contain many rules, not just one.
> Generally we take all 
> > the rules we need for an application and we assemble
> them into one 
> > rulebase, so we don't have to figure out which
> rulebase to use. Does 
> > that help?
> > 
> > Nikhil_dev [3/13/2009 8:16 AM] wrote:
> >> Perfect this is the situation but the only
> difference is the last
> > part,
> >>
> >> Rulebase for all the 3 Rules are stored in memory.
> >>
> >> Now i have is attributes(implemented as bean
> class), but the issue is
> > i dont
> >> know which Rulebase to use out of the three which
> is present in the
> > memory,
> >> fetching them one by one and executing it
> individually is possible but
> > a
> >> long procedure which i want to avoid.(executing 3
> Rule is ok what if i
> > have
> >> 100000 rules it will be very slow process)
> >>   
> > _______________________________________________
> > 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
> > 
> > 
> 
> 
> -----
> Regards,
> :working:Nikhil
> -- 
> View this message in context:
> http://www.nabble.com/Identify-Rule-on-Attributes-tp22471473p22532090.html
> Sent from the drools - user mailing list archive at
> Nabble.com.
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users


      



More information about the rules-users mailing list