On Mon, Mar 16, 2009 at 6:24 AM, Nikhil_dev <span dir="ltr"><<a href="mailto:k.nikhil@verchaska.com">k.nikhil@verchaska.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
As you guys have suggested to combine all the rule base into one then for<br>
example(one which i have already mentioned)<br>
i will combine Rule1 , rule 2 and rule3 into 1 rule base then, when i pass<br>
the variables to the rulebase who will i come to know which rules were<br>
executed.<br>
</blockquote><div><br>Knowing (as you say) about the execution of rules may be used by the<br>system you build in several ways. In any case, the right hand side of a<br>rule (after the "when" keyword) is the place to program the actions<br>
that preserve the knowledge that this rule has fired. If nothing is done<br>on the right hand side, then the effect of the execution of a rule is<br>indeed lost.<br><br>The most important ways of making use of the firing of a rule are:<br>
<br>(1) To assert a (new) fact into the Working Memory. This is done if<br>one expects these new facts to combine with each other or the original<br>facts in more rule firings.<br><br>(2) To modify an existing fact that has been found (matched) by<br>
the rule. This may, in turn, fire other rules.<br><br>(3) To make use of some application service to inform the user<br>of your system that the system has concluded a result. A very<br>simple way would be to print a message on the terminal; a more<br>
sophisticated way might be to send a message; etc. <br><br>Certainly any combination of these basic techniques is to be<br>considered as well.<br><br>You have, so far, shown us examples of very simple rules; it is<br>not clear to me what the purpose of this system will ultimately be.<br>
Therefore, I cannot advise you about what is best in your case.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">things i would like to know if i am going to execute this idea, the number<br>
of rules that i will using say around 100000, is it advisable to include all<br>
of them in to 1 rulebase!!!<br>
will there be any performance issues.<br>
</blockquote><div><br>Performance is not only a question of the number of rules; it is also<br>a question of the quality of the conditions, the number of patterns and<br>the number of facts that are asserted.<br> <br>100000 rules is certainly a big number. Memory consumption will<br>
be high. Loading facts and firing depends on the way patterns are<br>written, and how many facts you'll have in a session. But for me<br>the main point is how you'll manage to produce this many rules.<br>Even if you manage to think up, write and test one rule per minute<br>
then this would take 1666 hours or about 10 months of work!<br>Moreover, you'll have to make sure that this set of rules is consistent<br>in their combination, e.g., that it doesn't miss a combination of facts<br>
that it should react upon.<br><br>To build a good rule based system isn't easier than building any other<br>complex software system; perhaps it is even more difficult. There are<br>some good books around that describe the designs that might be applied<br>
with such systems; some of them are referenced on this page:<br><a href="http://www.jboss.org/drools/documentation.html">http://www.jboss.org/drools/documentation.html</a><br><br>-W<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
<br>
Anstis, Michael (M.) wrote:<br>
><br>
> Furthermore a rulebase can contain rules from many resources (e.g.<br>
> DRL's).<br>
><br>
> So I guess the cause of your pain is why do you need multiple<br>
> rulebases!??!<br>
><br>
> -----Original Message-----<br>
> From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a><br>
> [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>] On Behalf Of Scott Reed<br>
> Sent: 13 March 2009 14:41<br>
> To: Rules Users List<br>
> Subject: Re: [rules-users] Identify Rule on Attributes<br>
><br>
> A RuleBase can contain many rules, not just one. Generally we take all<br>
> the rules we need for an application and we assemble them into one<br>
> rulebase, so we don't have to figure out which rulebase to use. Does<br>
> that help?<br>
><br>
> Nikhil_dev [3/13/2009 8:16 AM] wrote:<br>
>> Perfect this is the situation but the only difference is the last<br>
> part,<br>
>><br>
>> Rulebase for all the 3 Rules are stored in memory.<br>
>><br>
>> Now i have is attributes(implemented as bean class), but the issue is<br>
> i dont<br>
>> know which Rulebase to use out of the three which is present in the<br>
> memory,<br>
>> fetching them one by one and executing it individually is possible but<br>
> a<br>
>> long procedure which i want to avoid.(executing 3 Rule is ok what if i<br>
> have<br>
>> 100000 rules it will be very slow process)<br>
>><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>
><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>
><br>
><br>
<br>
<br>
-----<br>
Regards,<br>
:working:Nikhil<br>
<font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/Identify-Rule-on-Attributes-tp22471473p22532090.html" target="_blank">http://www.nabble.com/Identify-Rule-on-Attributes-tp22471473p22532090.html</a><br>
Sent from the drools - user mailing list archive at Nabble.com.<br>
<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>