On Mon, Mar 16, 2009 at 6:24 AM, Nikhil_dev <span dir="ltr">&lt;<a href="mailto:k.nikhil@verchaska.com">k.nikhil@verchaska.com</a>&gt;</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 &quot;when&quot; 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&#39;ll have in a session. But for me<br>the main point is how you&#39;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&#39;ll have to make sure that this set of rules is consistent<br>in their combination, e.g., that it doesn&#39;t miss a combination of facts<br>
that it should react upon.<br><br>To build a good rule based system isn&#39;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>
&gt;<br>
&gt; Furthermore a rulebase can contain rules from many resources (e.g.<br>
&gt; DRL&#39;s).<br>
&gt;<br>
&gt; So I guess the cause of your pain is why do you need multiple<br>
&gt; rulebases!??!<br>
&gt;<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a><br>
&gt; [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>] On Behalf Of Scott Reed<br>
&gt; Sent: 13 March 2009 14:41<br>
&gt; To: Rules Users List<br>
&gt; Subject: Re: [rules-users] Identify Rule on Attributes<br>
&gt;<br>
&gt; A RuleBase can contain many rules, not just one. Generally we take all<br>
&gt; the rules we need for an application and we assemble them into one<br>
&gt; rulebase, so we don&#39;t have to figure out which rulebase to use. Does<br>
&gt; that help?<br>
&gt;<br>
&gt; Nikhil_dev [3/13/2009 8:16 AM] wrote:<br>
&gt;&gt; Perfect this is the situation but the only difference is the last<br>
&gt; part,<br>
&gt;&gt;<br>
&gt;&gt; Rulebase for all the 3 Rules are stored in memory.<br>
&gt;&gt;<br>
&gt;&gt; Now i have is attributes(implemented as bean class), but the issue is<br>
&gt; i dont<br>
&gt;&gt; know which Rulebase to use out of the three which is present in the<br>
&gt; memory,<br>
&gt;&gt; fetching them one by one and executing it individually is possible but<br>
&gt; a<br>
&gt;&gt; long procedure which i want to avoid.(executing 3 Rule is ok what if i<br>
&gt; have<br>
&gt;&gt; 100000 rules it will be very slow process)<br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
&gt;<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>