<div dir="ltr">Are you in a place where your rules have become sensitive to time and order? If so, have you considered CEP? If it&#39;s less about that and more about getting the work done ASAP, you could also investigate a messaging integration pattern to assist with all the pooling/throttling/queueing needs you&#39;ve mentioned.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 7, 2013 at 10:04 AM, Cotton, Ben <span dir="ltr">&lt;<a href="mailto:Ben.Cotton@morganstanley.com" target="_blank">Ben.Cotton@morganstanley.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">








<div lang="EN-US" link="blue" vlink="purple">
<p>
</p><div>
<p class="MsoNormal"><span style="font-size:16.0pt">Let’s say that a start-of-day, every day, we generate a giant 2,000+  rule .DRL, that we then use to construct into a
<b>single</b> run-time KnowledgeBase reference.  We then construct a <b>single</b> run-time KnowledgeSession reference (also at start of day).  Throughout the day, all day, facts “arrive” asynchronously into our expert system.  When a fact “arrives”, we synchronously
 place the fact onto our single KS and call .fireAllRules(), which in turn synchronously outputs answers that satisfy our “what’s the next step?” decision requirements. 
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt">We have this working very well, but we have the ambition to achieve more.   <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt">We want  to attempt to scale this solution to accommodate the high-frequency simultaneous “arrival” of many facts.  We have at our disposal a 24xCPU 128 gb Linux-based compute resource (nice, right?) … so,
 ideally, we have the ambition to potentially accommodate the simultaneous arrival of 24 facts into our expert system.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt">Assuming that all of our 2,000+ rules are completely isolated (i.e. no rule i ever depends on any rule j, for all i,j) we want to consider building (at start of day) a KSPool (size 24) , KBPool (size 24),
 and a ThreadPoolExecutor (size 24, backed by BlockingQueue).   As facts arrive throughout the day, those that arrive simultaneously are Queue’d to the TPE, that then delegates the fact’s need for service to a task Runnable,  which in turn calls a KSPool[i].fireAllRules()
 (with isolation to KBPool[i]).  In such a scheme, we would potentially be able to render decisions concurrently when facts arrive simultaneously ( capacity 24).<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt">Is this design ambition common w/in current DROOLs use cases?  Does the current (or future) DROOLS offering include any in-place capability to Pool KS or Pool KB?  If not, are there any potential DROOLs concerns
 or “gotchas” wrt to our pursuing this ambition (in a “let’s build this now!” prototype)? 
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt">As always, tremendous thanks to all in this community forum.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:gray"><u></u> <u></u></span></b></p>
<p class="MsoNormal"><b><span style="color:gray">Ben D Cotton III</span></b><span style="font-size:9.0pt;color:gray"><br>
Morgan Stanley &amp; Co.<br>
OTC Derivatives Clearing Technology <br>
1221 AOTA Rockefeller Ctr - Flr 27<br>
New York, NY 10020<br>
<a href="tel:%28212%29762.9094" value="+12127629094" target="_blank">(212)762.9094</a><br>
<a href="mailto:ben.cotton@ms.com" target="_blank"><span style="color:gray">ben.cotton@ms.com</span></a>
<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<br><br>
<hr>
<br><span style="FONT-FAMILY:Arial;COLOR:#808080;FONT-SIZE:7.5pt">NOTICE: 
Morgan Stanley is not acting as a municipal advisor and the opinions or views 
contained herein are not intended to be, and do not constitute, advice within 
the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer 
Protection Act. If you have received this communication in error, please destroy 
all electronic and paper copies and notify the sender immediately. 
Mistransmission is not intended to waive confidentiality or privilege. Morgan 
Stanley reserves the right, to the extent permitted under applicable law, to 
monitor electronic communications. This message is subject to terms available at 
the following link: <a style="FONT-FAMILY:Arial;COLOR:#808080;FONT-SIZE:7.5pt" href="http://www.morganstanley.com/disclaimers" target="_blank">http://www.morganstanley.com/disclaimers</a> 
If you cannot access these links, please notify us by reply message and we will 
send the contents to you. By messaging with Morgan Stanley you consent to the 
foregoing.</span><br>
<p></p>
<p></p><p></p></div>


<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></blockquote></div><br></div>