<br>&nbsp;&nbsp; I guess you need to talk to Kris, the ruleflow master. :)<br><br><div class="gmail_quote">2008/11/6 techy <span dir="ltr">&lt;<a href="mailto:techluver007@gmail.com">techluver007@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Thanks Edson for the clarification.<br>
1. actually I want to manage rule flow from the database.<br>
Do I have to store whole rfm file content in the database as text column?<br>
If so, I was looking at the sample rfm file and its content does not look<br>
simpler. If I want to edit to rfm file in the database(add/remove nodes or<br>
rule group etc),it seems too much complicated or very error prone.Editing of<br>
rfm does not look feasible without using eclipse graphical editor. If that&#39;s<br>
the case, How can I have rule flow as database driven? Or may be whenever I<br>
want to edit rule flow, then I can do it in the eclipse GUI and update the<br>
content in the databse. then I wont call this as database driven. Please<br>
clarify.<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
Edson Tirelli-3 wrote:<br>
&gt;<br>
&gt; &nbsp; &nbsp;Trying to answer:<br>
&gt;<br>
&gt; 1. not sure what you mean. You design a rule flow as a sequence of steps<br>
&gt; (groups) in the same way you would do when designing a workflow. When you<br>
&gt; write your rules, you associate those rules to groups in that flow. The<br>
&gt; ruleflow design itself is an XML file. So, the general answer is: you can<br>
&gt; store a ruleflow in a database. Rebuilding the rulebase is fine, and<br>
&gt; AFAIK,<br>
&gt; ruleflows are dynamic, so you can add them to existing rulebases. Kris can<br>
&gt; confirm this to you.<br>
&gt;<br>
&gt; 2. yes, there are several optimizations you can do to the engine and to<br>
&gt; your<br>
&gt; rules, in a similar way you would do for a database. Which optimizations<br>
&gt; and<br>
&gt; how to do it can only be answered by seeing your use case, and fine<br>
&gt; tunning<br>
&gt; it. Regarding volumes, we have users using thousands of rules and millions<br>
&gt; of facts without problems, but as you know, the bigger the size, more<br>
&gt; careful you need to be on the engine configuration and the quality of your<br>
&gt; rules.<br>
&gt; I&#39;m trying to get a user to write a blog on the sizing of the application<br>
&gt; they have right now. I don&#39;t want to disclose the information before they<br>
&gt; allow me to do it, but their specific solution does not have as many rules<br>
&gt; as yours, but process a similar volume of facts as yours in 2-hours<br>
&gt; windows.<br>
&gt; They run in a server with just a few cores, but use a considerable amount<br>
&gt; of<br>
&gt; memory.<br>
&gt;<br>
&gt; &nbsp; &nbsp;Regarding your question about if a production rules engine fits your<br>
&gt; use<br>
&gt; case, Rete algorithm as a general rule, will provide increasing benefits<br>
&gt; as<br>
&gt; the rule base grows, because more rules you have, more you will benefit of<br>
&gt; optimizations like node sharing and other techniques.<br>
&gt;<br>
&gt; &nbsp; &nbsp;If you go ahead, I suggest you contact Red Hat. They can help with your<br>
&gt; solution design, training (if necessary) as well as provide support for<br>
&gt; development and production.<br>
&gt;<br>
&gt; &nbsp; &nbsp;[]s<br>
&gt; &nbsp; &nbsp;Edson<br>
&gt;<br>
&gt; 2008/11/4 techy &lt;<a href="mailto:techluver007@gmail.com">techluver007@gmail.com</a>&gt;<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Thanks Edson.<br>
&gt;&gt; Few more questions based on my requirements.<br>
&gt;&gt;<br>
&gt;&gt; I want to load all rules from the database once for everyday(during daily<br>
&gt;&gt; job startup) and apply them against huge amount of data.here rules are<br>
&gt;&gt; once<br>
&gt;&gt; loaded, no further need for dynamic addition/removal during that<br>
&gt;&gt; execution.<br>
&gt;&gt; But If I add any new rules to the database, rule engine should be able to<br>
&gt;&gt; pick those during next execution(Intention here is to provide a custom<br>
&gt;&gt; editor later on for the user to manage the rules.since droosl&#39;s BRMS does<br>
&gt;&gt; not seem handle all of our use case conditions, I&#39;ve concluded to have<br>
&gt;&gt; custom BRMS).<br>
&gt;&gt;<br>
&gt;&gt; 1.Can I have rule flow as database driven?<br>
&gt;&gt; i.e Can I store rule flow content for each rule as text column in the<br>
&gt;&gt; database and create rule flow file during the execution of each &nbsp;day?<br>
&gt;&gt;<br>
&gt;&gt; 2. my requirement is to run 1200 use cases(rules) against 40- 50 million<br>
&gt;&gt; records each day, I&#39;m really concerned about execution time also. Can I<br>
&gt;&gt; do<br>
&gt;&gt; any optimization in the rule engine for faster execution?<br>
&gt;&gt; Is rule engine still a good option in this case?<br>
&gt;&gt;<br>
&gt;&gt; appreciate your help.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Edson Tirelli-3 wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &nbsp; &nbsp; Yuri,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &nbsp; &nbsp; Right now, the only way is to work with different rule bases and<br>
&gt;&gt; &gt; working<br>
&gt;&gt; &gt; memories. Even using agenda-groups or rule-flow, rules are still being<br>
&gt;&gt; &gt; eagerly evaluated, as this is how standard Rete works.<br>
&gt;&gt; &gt; &nbsp; &nbsp; The problem of creating and canceling too many activations is a<br>
&gt;&gt; known<br>
&gt;&gt; &gt; problem and the only way around it right now is sequential mode, but<br>
&gt;&gt; &gt; sequential mode has some restrictions on what you can do. For instance,<br>
&gt;&gt; &gt; you<br>
&gt;&gt; &gt; must work with a stateless working memory and can not modify/retract<br>
&gt;&gt; facts<br>
&gt;&gt; &gt; in your rules to work with sequential mode, but it will give you big<br>
&gt;&gt; &gt; performance boosts.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &nbsp; &nbsp; We are evaluating the possibility of creating physical network<br>
&gt;&gt; &gt; partitions for next version, but that will require some R&amp;D yet.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &nbsp; &nbsp; []s<br>
&gt;&gt; &gt; &nbsp; &nbsp; Edson<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 2007/8/14, Yuri &lt;<a href="mailto:ydewit@gmail.com">ydewit@gmail.com</a>&gt;:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Dr. Gernot Starke &lt;gs &lt;at&gt; <a href="http://gernotstarke.de" target="_blank">gernotstarke.de</a>&gt; writes:<br>
&gt;&gt; &gt;&gt; &gt; can you detail your problem a little?<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I basically need to find perfect matches between two different sets of<br>
&gt;&gt; &gt;&gt; objects.<br>
&gt;&gt; &gt;&gt; If perfect matches are not found, I then create bulks of objects that<br>
&gt;&gt; are<br>
&gt;&gt; &gt;&gt; then<br>
&gt;&gt; &gt;&gt; used in combination with the individual ones to find bulk matches. If<br>
&gt;&gt; no<br>
&gt;&gt; &gt;&gt; matches<br>
&gt;&gt; &gt;&gt; are found I need then to categorize the breaks (around 10 different<br>
&gt;&gt; &gt;&gt; categorizations) and report them.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; The matching criteria between two object is specific enough to be<br>
&gt;&gt; fast.<br>
&gt;&gt; &gt;&gt; Once I<br>
&gt;&gt; &gt;&gt; get into break, which basically is removing some criteria components,<br>
&gt;&gt; the<br>
&gt;&gt; &gt;&gt; possible combinations increase exponentially. Bulking just compounds<br>
&gt;&gt; the<br>
&gt;&gt; &gt;&gt; problem<br>
&gt;&gt; &gt;&gt; by adding more matchable/breakable facts into memory.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; My bulking logic (I didnt have collect when I started with 3.0) starts<br>
&gt;&gt; a<br>
&gt;&gt; &gt;&gt; bulk<br>
&gt;&gt; &gt;&gt; looking for two diff objects with the same bulkling criteria (this is<br>
&gt;&gt; my<br>
&gt;&gt; &gt;&gt; first<br>
&gt;&gt; &gt;&gt; potential cross product since drools would produce C!/N!(C-N)!<br>
&gt;&gt; &gt;&gt; combinations).<br>
&gt;&gt; &gt;&gt; Then once the bulk for a given criteria is create I have a second rule<br>
&gt;&gt; &gt;&gt; that<br>
&gt;&gt; &gt;&gt; expands or contracts the bulks as new facts are asserted causing many<br>
&gt;&gt; &gt;&gt; different<br>
&gt;&gt; &gt;&gt; side effects.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; What I am basically seeing is that asserting a fact that would for<br>
&gt;&gt; &gt;&gt; instance be a<br>
&gt;&gt; &gt;&gt; perfect match, causes many of the bulking and breaking rule<br>
&gt;&gt; activations<br>
&gt;&gt; &gt;&gt; to<br>
&gt;&gt; &gt;&gt; be<br>
&gt;&gt; &gt;&gt; created and then cancelled. Considering that I am talking about tens<br>
&gt;&gt; or<br>
&gt;&gt; &gt;&gt; hundreds<br>
&gt;&gt; &gt;&gt; of thousands of facts I thought that if I could stage the activation<br>
&gt;&gt; &gt;&gt; creations I<br>
&gt;&gt; &gt;&gt; would increase processing speed.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; With 15K objects on each side I have been seeing something like 1<br>
&gt;&gt; &gt;&gt; assertion per<br>
&gt;&gt; &gt;&gt; second.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I am aware that this could be cross product somewhere but I have<br>
&gt;&gt; already<br>
&gt;&gt; &gt;&gt; revised<br>
&gt;&gt; &gt;&gt; the rules many many times so now I am looking for other alternatives.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I am now trying to understand looking I basically need to find perfect<br>
&gt;&gt; &gt;&gt; matches<br>
&gt;&gt; &gt;&gt; between two different sets of objects. If perfect matches are not<br>
&gt;&gt; found,<br>
&gt;&gt; &gt;&gt; I<br>
&gt;&gt; &gt;&gt; then<br>
&gt;&gt; &gt;&gt; create bulks of objects that are then used in combination with the<br>
&gt;&gt; &gt;&gt; individual<br>
&gt;&gt; &gt;&gt; one to find bulk matches. If no matches are found I need then to<br>
&gt;&gt; &gt;&gt; categorize the<br>
&gt;&gt; &gt;&gt; breaks (around 10 different categorizations) and report them.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; rules-users mailing list<br>
&gt;&gt; &gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; &nbsp; Edson Tirelli<br>
&gt;&gt; &gt; &nbsp; Software Engineer - JBoss Rules Core Developer<br>
&gt;&gt; &gt; &nbsp; Office: +55 11 3529-6000<br>
&gt;&gt; &gt; &nbsp; Mobile: +55 11 9287-5646<br>
&gt;&gt; &gt; &nbsp; JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; rules-users mailing list<br>
&gt;&gt; &gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; View this message in context:<br>
&gt;&gt; <a href="http://www.nabble.com/Independent-rule-evaluations-tp12129972p20335308.html" target="_blank">http://www.nabble.com/Independent-rule-evaluations-tp12129972p20335308.html</a><br>
&gt;&gt; Sent from the drools - user mailing list archive at Nabble.com.<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; rules-users mailing list<br>
&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; &nbsp;Edson Tirelli<br>
&gt; &nbsp;JBoss Drools Core Development<br>
&gt; &nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</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>
</div></div>View this message in context: <a href="http://www.nabble.com/Independent-rule-evaluations-tp12129972p20364536.html" target="_blank">http://www.nabble.com/Independent-rule-evaluations-tp12129972p20364536.html</a><br>

<div><div></div><div class="Wj3C7c">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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br> &nbsp;Edson Tirelli<br> &nbsp;JBoss Drools Core Development<br> &nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>