<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Just stick with standard inference mode, until you reach a problem
(which is unlikely), you only gain any real performance benefit from
sequantiel mode for large numbers of facts and rules. Unless you rule
authors have a problem deal with inference mode, then obviously you
need to just use sequential mode. i.e. probably best to make it a user
driven choice, rather than technical.<br>
<br>
Mark<br>
Vijay K Pandey wrote:
<blockquote
cite="mid:412F68BC577B1444952EECC341CDE93B9858ED7F@HQSOMBX001.mdesad.mdesnet.ms.gov"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 77.95pt 1.0in 77.95pt;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:1415081481;
        mso-list-type:hybrid;
        mso-list-template-ids:546580274 67698711 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-number-format:alpha-lower;
        mso-level-text:"%1\)";
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level4
        {mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level7
        {mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>
<div class="Section1">
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">Can anyone
comment on my questions? If you
need any more information please let me know.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">Thanks<o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">Vijay<o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p>
<div>
<div class="MsoNormal" style="text-align: center;" align="center"><font
face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr tabindex="-1" align="center" size="2" width="100%"></span></font></div>
<p class="MsoNormal"><b><font face="Tahoma" size="2"><span
style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font
face="Tahoma" size="2"><span
style="font-size: 10pt; font-family: Tahoma;">
<a class="moz-txt-link-abbreviated" href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>
[<a class="moz-txt-link-freetext" href="mailto:rules-users-bounces@lists.jboss.org">mailto:rules-users-bounces@lists.jboss.org</a>] <b><span
style="font-weight: bold;">On
Behalf Of </span></b>Vijay K Pandey<br>
<b><span style="font-weight: bold;">Sent:</span></b> Saturday, August
15, 2009
2:52 PM<br>
<b><span style="font-weight: bold;">To:</span></b> Rules Users List<br>
<b><span style="font-weight: bold;">Subject:</span></b> Re:
[rules-users] Drrols
5 Expert --> Sequential vs Inference</span></font><o:p></o:p></p>
</div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">Here is more information on this.<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"
style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><font
face="Courier New" size="2"><span style="font-size: 10pt;"><span
style="">a)<font face="Times New Roman" size="1"><span
style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</span></font></span></span></font><!--[endif]-->Our
business transactions (OLTP + batches (sequential)) can result in the
range of
500K to 750k of transactions in a day. All these are short running
transactions
and max # of business rules that can get executed in it can be in the
range of
50-75 <o:p></o:p></p>
<p class="MsoPlainText"
style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><font
face="Courier New" size="2"><span style="font-size: 10pt;"><span
style="">b)<font face="Times New Roman" size="1"><span
style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</span></font></span></span></font><!--[endif]-->Each
transaction can roughly interact with around 10 to 15 RDBMS tables with
CRUD
operations<o:p></o:p></p>
<p class="MsoPlainText"
style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><font
face="Courier New" size="2"><span style="font-size: 10pt;"><span
style="">c)<font face="Times New Roman" size="1"><span
style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</span></font></span></span></font><!--[endif]-->Read
can result of no more than 100 records and CUD of no more than 25
records max
in a single transaction<o:p></o:p></p>
<p class="MsoPlainText"
style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><font
face="Courier New" size="2"><span style="font-size: 10pt;"><span
style="">d)<font face="Times New Roman" size="1"><span
style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</span></font></span></span></font><!--[endif]-->We
do cache lookup/master data – but we don’t cache the transactional data
(few
tables have around 10 million records) --- within a business process
there is
always a likelihood of checking least 5 to 10 associated transaction
data for
the inserted fact. Our transactional data is always changing.<o:p></o:p></p>
<p class="MsoPlainText"
style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><font
face="Courier New" size="2"><span style="font-size: 10pt;"><span
style="">e)<font face="Times New Roman" size="1"><span
style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</span></font></span></span></font><!--[endif]-->Not
all the rules are evaluated for each input – we can have a max of
around 20 to
25 business rules max for a given input.<o:p></o:p></p>
<p class="MsoPlainText"
style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><font
face="Courier New" size="2"><span style="font-size: 10pt;"><span
style="">f)<font face="Times New Roman" size="1"><span
style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</span></font></span></span></font><!--[endif]-->We
do have the lookup/master data perfected – which form a good amount of
LHS
condition but along with that mostly all our business process have
rules that
have to do some checks against associated transactional data which
can’t be
perfected.<o:p></o:p></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">Thanks<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">Vijay<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">-----Original Message-----<br>
From: <a class="moz-txt-link-abbreviated" href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>
[<a class="moz-txt-link-freetext" href="mailto:rules-users-bounces@lists.jboss.org">mailto:rules-users-bounces@lists.jboss.org</a>] On Behalf Of Greg Barton<br>
Sent: Saturday, August 15, 2009 12:53 AM<br>
To: Rules Users List<br>
Subject: Re: [rules-users] Drrols 5 Expert --> Sequential vs
Inference<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">Answering this question in any meaningful way
without more information
is difficult. My first instinct is to wonder if the database calls
really
need to be done directly from the LHS of the rules, especially with
this many
of them. I hope you're able to cache the database queries.<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">Anyway, in general, if you have that many
rules it is usually best to
keep them in a fashion that's easily manageable, and that's what RBMSs
are
for. Apart from that it's hard to address your question without more
information. Are all of the 3500*0.9 rules evaluated for each
input? Can the data from the database be prefetched into working
memory
instead of fetched in each LHS? How often does this fetched data
change?
There are many paths you could follow mattering on the answers to these
questions
and others.<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">--- On Fri, 8/14/09, Vijay K Pandey
<a class="moz-txt-link-rfc2396E" href="mailto:VPandey@mdes.ms.gov"><VPandey@mdes.ms.gov></a> wrote:<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> From: Vijay K Pandey
<a class="moz-txt-link-rfc2396E" href="mailto:VPandey@mdes.ms.gov"><VPandey@mdes.ms.gov></a><o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> Subject: [rules-users] Drrols 5 Expert
--> Sequential vs
Inference<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> To: <a class="moz-txt-link-rfc2396E" href="mailto:rules-users@lists.jboss.org">"rules-users@lists.jboss.org"</a>
<a class="moz-txt-link-rfc2396E" href="mailto:rules-users@lists.jboss.org"><rules-users@lists.jboss.org></a><o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> Date: Friday, August 14, 2009, 10:52 PM<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> Hi,<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> We have around 3500<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> business rules and<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> rules are mainly look up value based or
based on the<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> associated data in the<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> RDBMS.<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> There are around 90%<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> processes where we<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> only need sequential rules check, the
other 10% of<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> processes requires the<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> inference capability.<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> My<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> questions:<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> a)<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> Which is the best<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> way to go for this<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> – should we set up all the rules as
inference through<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> stateful session or<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> segregate 90% as sequential and others
as inference. Will<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> this segregation<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> going to give better performance in
Drools 5 and<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> later?<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> b)<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> Lots of our LHS<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> depends on the data from<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> RDBMS – we insert 1 fact – then make use
of<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> “from/collect” to get hold of various<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> associated data ---then do<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> some checks on the data fetched from
RDBMS -- so is it<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> better to program them<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> in java directly or as sequential rules?<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> Any guidance will be<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> helpful?<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> Thanks<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">> Vijay<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">_______________________________________________<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">rules-users mailing list<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><o:p></o:p></span></font></p>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>