<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><base href="x-msg://3635/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>We all know what they say about premature optimisation, so maybe it would be worth stating your performance goals? It might help with establishing which direction the optimisations should go. And also whether such optimisations are even worth trying to achieve.</div><div><br></div><div>In a knowledge base with a reasonable number of rules, and especially if a number of facts need to be derived on start-up, the technique Wolfgang mentions with a long-running session is what I have found tends to give me the best performance. i.e. For each incoming request: insert, fire, retract, fire. Obviously it depends on your rules, but sub-millisecond evaluations are quite achieveable (~20 microseconds is the fastest I have achieved so far). Which takes me back to the question of what throughput do you need to achieve? And how bursty are you expecting it to be?</div><div><br></div><div>Of course, if there is no dependence between evaluations (i.e. you're not accumulating transaction values or anything like that) it's pretty simple to set up a queue of requests and a pool of stateful sessions, so it's not that much wasted effort if you don't need it.</div><div><br></div><div>Steve</div><div><br></div><div><br></div><br><div><div>On 7 Feb 2013, at 18:05, "Cotton, Ben" &lt;<a href="mailto:Ben.Cotton@morganstanley.com">Ben.Cotton@morganstanley.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><br class="webkit-block-placeholder"></div><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 14pt; font-family: 'Lucida Console'; text-indent: -0.25in; "><span style="font-family: Wingdings; "><span>Ø<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman'; "><span class="Apple-converted-space">&nbsp;</span></span></span></span>Maybe you just need a StatelessKnowledgeSession (you're using this term in a later mail), that, when used in *sequential mode* is faster.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; "><span style="font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">But the fear we have here is that the backing queue of simultaneously arriving facts could back up if we process in synchronous sequence.&nbsp; We are willing to trade off an individual fact being processed more slowly, if we can simultaneously process many facts.<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; "><span style="font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><br>As you point off, the pattern that wins the “sequential v. parallel” bake-off is TBD.<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; "><span style="font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">-----Original Message-----<br>From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [mailto:rules-<a href="mailto:users-bounces@lists.jboss.org">users-bounces@lists.jboss.org</a>] On Behalf Of Wolfgang Laun<br>Sent: Thursday, February 07, 2013 12:50 PM<br>To: Rules Users List<br>Subject: Re: [rules-users] ambition = ThreadPoolExecutor delegating to KBPool(s) &amp; KSPools(s)<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">KnowledgeSessions are created from a KnowledgeBase, and they are independent from each other, even when they come from a single KnowledgeBase. So I don't see the need for 24 KBases.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">You've referred to "fireAllRules()", which isn't available with a StatelessKnowledgeSession. Maybe you just need a StatelessKnowledgeSession (you're using this term in a later mail), that, when used in *sequential mode* is faster. Otherwise, disposing a StatelessKnowledgeSession after processing each fact may not be faster than simply retracting the fact from a StatefulKnowledgeSession, which would prepare it for the next task, and not cause everything to go through GC.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">Just benchmarking will tell you what is best for your scenario.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">-W<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">On 07/02/2013, Cotton, Ben &lt;<a href="mailto:Ben.Cotton@morganstanley.com" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">Ben.Cotton@morganstanley.com</span></a>&gt; wrote:<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Thanks Jeremy.&nbsp; Just finished watching your referenced video&nbsp; "Drools<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; &amp; Large Data Sets Workshop" - no doubt about it, people are explicitly<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; using this pattern (Pool,Queue,Delegate,Callback) w/in Drools to<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; achieve higher concurrent "simultaneous fact arrival" transaction throughput, and scale.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Especially appreciate your comment re: managing Runnables' callbacks<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; w/in the proposed framework... we indeed have to be careful here, and<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; will re-factor or design accordingly.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; From:<span class="Apple-converted-space">&nbsp;</span><a href="mailto:rules-users-bounces@lists.jboss.org" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">rules-users-bounces@lists.jboss.org</span></a><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; [<a href="mailto:rules-users-bounces@lists.jboss.org" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">mailto:rules-users-bounces@lists.jboss.org</span></a>] On Behalf Of Jeremy Ary<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Sent: Thursday, February 07, 2013 12:08 PM<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; To: Rules Users List<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Subject: Re: [rules-users] ambition = ThreadPoolExecutor delegating to<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; KBPool(s) &amp; KSPools(s)<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Yep, that all makes sense for the more elaborated context. Sounds like<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; you're working with a model wherein you needn't concern yourself with<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; relational logic between instances, so I think the value of splitting<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; sessions over threads with a multi-consumer queueing setup could allow<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; you the opportunity to async your process with better throughput. What<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; you and I propose differs only in high-availability and scalability of<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; the input stream (potentially arising from throttling to a single<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; instance responsible for maintaining task scheduling and executor<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; lifecycle), offering an ability to recover should you lose your<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; application containing pooled tasks and allow for smaller pool sizes<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; to maintain (pull only as needed/desired from queueing and adjust that<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; capacity on the fly for high-usage times such as first thing in the morning).<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Semi-related I just found a video about a large-scale operation that<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Alexandre Porcelli created that might be of some interest to you.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<span class="Apple-converted-space">&nbsp;</span><a href="http://vimeo.com/27209589" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">http://vimeo.com/27209589</span></a><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; My only other thoughts going into it is consider some different<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; approaches for the scheduling mechanism given that, as I've had the<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; unpleasure of discovering before, callbacks from runnables can be fun<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; to keep up with of you're dependent on them, so fire-and-forget vs.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; results synchronicity can make a difference in the mechanism you<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; choose to maintain your tasks and pools.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Regards,<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Jeremy<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; On Thu, Feb 7, 2013 at 10:47 AM, Cotton, Ben<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; &lt;<a href="mailto:Ben.Cotton@morganstanley.com%3cmailto:Ben.Cotton@morganstanley.com" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">Ben.Cotton@morganstanley.com&lt;mailto:Ben.Cotton@morganstanley.com</span></a>&gt;&gt; wrote:<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Thanks for your response, Ary.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; It is much more about accommodating high-frequency and throughput.&nbsp;<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; The rules&nbsp; are ZERO sensitive to time and order - they are rendered 1x<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; at start of day.&nbsp; They are exceedingly complicated, and there are lots of them ...<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; but once they are bound to a KB nothing changes about them for the whole<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; day.&nbsp;&nbsp; When we put a fact on a KS.fireAllRules() task the rendered decision<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; is idempotent wrt to rules' firing(s) order.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Also, all arriving facts are immutable and all sessions are stateless,<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; so we kind of have ignored CEP (seeing it as more appropriate for a<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; long-living ecosystem of continuously mutating facts).<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Effectively, we want a "small, simple, safe, speedy" body of<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; operations on "complex, cumbersome, concurrently-arriving, constant" facts.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; From:<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<span class="Apple-converted-space">&nbsp;</span><a href="mailto:rules-users-bounces@lists.jboss.org%3cmailto:rules-users-bounces@lists.j" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">rules-users-bounces@lists.jboss.org&lt;mailto:rules-users-bounces@lists.j</span></a><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; <a href="http://boss.org">boss.org</a>&gt;<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; [mailto:rules-<a href="mailto:users-bounces@lists.jboss.org">users-bounces@lists.jboss.org</a>&lt;mailto:rules-users-bounces<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; @<a href="http://lists.jboss.org">lists.jboss.org</a>&gt;]<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; On Behalf Of Jeremy Ary<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Sent: Thursday, February 07, 2013 11:32 AM<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; To: Rules Users List<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Subject: Re: [rules-users] ambition = ThreadPoolExecutor delegating to<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; KBPool(s) &amp; KSPools(s)<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Are you in a place where your rules have become sensitive to time and order?<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; If so, have you considered CEP? If it's less about that and more about<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; getting the work done ASAP, you could also investigate a messaging<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; integration pattern to assist with all the pooling/throttling/queueing<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; needs you've mentioned.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; On Thu, Feb 7, 2013 at 10:04 AM, Cotton, Ben<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; &lt;<a href="mailto:Ben.Cotton@morganstanley.com%3cmailto:Ben.Cotton@morganstanley.com" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">Ben.Cotton@morganstanley.com&lt;mailto:Ben.Cotton@morganstanley.com</span></a>&gt;&gt; wrote:<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Let's say that a start-of-day, every day, we generate a giant 2,000+&nbsp;<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; rule .DRL, that we then use to construct into a single run-time<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; KnowledgeBase reference.&nbsp; We then construct a single run-time<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; KnowledgeSession reference (also at start of day).&nbsp; Throughout the day, all day, facts "arrive"<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; asynchronously into our expert system.&nbsp; When a fact "arrives", we<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; synchronously place the fact onto our single KS and call<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; .fireAllRules(), which in turn synchronously outputs answers that<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; satisfy our "what's the next step?" decision requirements.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; We have this working very well, but we have the ambition to achieve more.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; We want&nbsp; to attempt to scale this solution to accommodate the<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; high-frequency simultaneous "arrival" of many facts.&nbsp; We have at our<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; disposal a 24xCPU 128 gb Linux-based compute resource (nice, right?)<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; ... so, ideally, we have the ambition to potentially accommodate the<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; simultaneous arrival of 24 facts into our expert system.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Assuming that all of our 2,000+ rules are completely isolated (i.e. no<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; rule i ever depends on any rule j, for all i,j) we want to consider<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; building (at start of day) a KSPool (size 24) , KBPool (size 24), and a<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; ThreadPoolExecutor (size 24, backed by BlockingQueue).&nbsp;&nbsp; As facts arrive<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; throughout the day, those that arrive simultaneously are Queue'd to<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; the TPE, that then delegates the fact's need for service to a task<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Runnable,&nbsp; which in turn calls a KSPool[i].fireAllRules() (with<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; isolation to KBPool[i]).&nbsp; In such a scheme, we would potentially be<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; able to render decisions concurrently when facts arrive simultaneously ( capacity 24).<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Is this design ambition common w/in current DROOLs use cases?&nbsp; Does<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; the current (or future) DROOLS offering include any in-place<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; capability to Pool KS or Pool KB?&nbsp; If not, are there any potential DROOLs concerns or "gotchas"<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; wrt to our pursuing this ambition (in a "let's build this now!" prototype)?<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; As always, tremendous thanks to all in this community forum.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Ben D Cotton III<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Morgan Stanley &amp; Co.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; OTC Derivatives Clearing Technology<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; 1221 AOTA Rockefeller Ctr - Flr 27<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; New York, NY 10020<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; (212)762.9094&lt;<a href="tel:%28212%29762.9094" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">tel:%28212%29762.9094</span></a>&gt;<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<span class="Apple-converted-space">&nbsp;</span><a href="mailto:ben.cotton@ms.com%3cmailto:ben.cotton@ms.com" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">ben.cotton@ms.com&lt;mailto:ben.cotton@ms.com</span></a>&gt;<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; ________________________________<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; NOTICE: Morgan Stanley is not acting as a municipal advisor and the<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; opinions or views contained herein are not intended to be, and do not<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; constitute, advice within the meaning of Section 975 of the Dodd-Frank<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Wall Street Reform and Consumer Protection Act. If you have received<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; this communication in error, please destroy all electronic and paper<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; copies and notify the sender immediately. Mistransmission is not<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; intended to waive confidentiality or privilege. Morgan Stanley<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; reserves the right, to the extent permitted under applicable law, to<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; monitor electronic communications. This message is subject to terms available at the following link:<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<span class="Apple-converted-space">&nbsp;</span><a href="http://www.morganstanley.com/disclaimers" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">http://www.morganstanley.com/disclaimers</span></a><span class="Apple-converted-space">&nbsp;</span>If you cannot access these<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; links, please notify us by reply message and we will send the contents<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; to you. By messaging with Morgan Stanley you consent to the foregoing.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; _______________________________________________<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; rules-users mailing list<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<span class="Apple-converted-space">&nbsp;</span><a href="mailto:rules-users@lists.jboss.org%3cmailto:rules-users@lists.jboss.org" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">rules-users@lists.jboss.org&lt;mailto:rules-users@lists.jboss.org</span></a>&gt;<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<span class="Apple-converted-space">&nbsp;</span><a href="https://lists.jboss.org/mailman/listinfo/rules-users" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">https://lists.jboss.org/mailman/listinfo/rules-users</span></a><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; ________________________________<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; NOTICE: Morgan Stanley is not acting as a municipal advisor and the<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; opinions or views contained herein are not intended to be, and do not<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; constitute, advice within the meaning of Section 975 of the Dodd-Frank<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Wall Street Reform and Consumer Protection Act. If you have received<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; this communication in error, please destroy all electronic and paper<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; copies and notify the sender immediately. Mistransmission is not<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; intended to waive confidentiality or privilege. Morgan Stanley<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; reserves the right, to the extent permitted under applicable law, to<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; monitor electronic communications. This message is subject to terms available at the following link:<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<span class="Apple-converted-space">&nbsp;</span><a href="http://www.morganstanley.com/disclaimers" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">http://www.morganstanley.com/disclaimers</span></a><span class="Apple-converted-space">&nbsp;</span>If you cannot access these<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; links, please notify us by reply message and we will send the contents<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; to you. By messaging with Morgan Stanley you consent to the foregoing.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; _______________________________________________<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; rules-users mailing list<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<span class="Apple-converted-space">&nbsp;</span><a href="mailto:rules-users@lists.jboss.org%3cmailto:rules-users@lists.jboss.org" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">rules-users@lists.jboss.org&lt;mailto:rules-users@lists.jboss.org</span></a>&gt;<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<span class="Apple-converted-space">&nbsp;</span><a href="https://lists.jboss.org/mailman/listinfo/rules-users" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">https://lists.jboss.org/mailman/listinfo/rules-users</span></a><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; ________________________________<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; NOTICE: Morgan Stanley is not acting as a municipal advisor and the<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; opinions or views contained herein are not intended to be, and do not<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; constitute, advice within the meaning of Section 975 of the Dodd-Frank<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; Wall Street Reform and Consumer Protection Act. If you have received<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; this communication in error, please destroy all electronic and paper<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; copies and notify the sender immediately. Mistransmission is not<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; intended to waive confidentiality or privilege. Morgan Stanley<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; reserves the right, to the extent permitted under applicable law, to<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; monitor electronic communications. This message is subject to terms available at the following link:<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<span class="Apple-converted-space">&nbsp;</span><a href="http://www.morganstanley.com/disclaimers" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">http://www.morganstanley.com/disclaimers</span></a><span class="Apple-converted-space">&nbsp;</span>If you cannot access these<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; links, please notify us by reply message and we will send the contents<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt; to you. By messaging with Morgan Stanley you consent to the foregoing.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">&gt;<o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">_______________________________________________<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; ">rules-users mailing list<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; "><a href="mailto:rules-users@lists.jboss.org" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">rules-users@lists.jboss.org</span></a><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 14pt; font-family: 'Lucida Console'; "><a href="https://lists.jboss.org/mailman/listinfo/rules-users" style="color: purple; text-decoration: underline; "><span style="color: windowtext; text-decoration: none; ">https://lists.jboss.org/mailman/listinfo/rules-users</span></a><o:p></o:p></div></div><br><br><hr id="HR1"><br><span style="font-family: Arial; color: rgb(128, 128, 128); 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:<span class="Apple-converted-space">&nbsp;</span><a href="http://www.morganstanley.com/disclaimers" style="color: rgb(128, 128, 128); text-decoration: underline; font-family: Arial; font-size: 7.5pt; ">http://www.morganstanley.com/disclaimers</a><span class="Apple-converted-space">&nbsp;</span>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><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" style="color: purple; text-decoration: underline; ">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" style="color: purple; text-decoration: underline; ">https://lists.jboss.org/mailman/listinfo/rules-users</a></div></blockquote></div><br></body></html>