<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40" xmlns:ns5="http://schemas.microsoft.com/office/2004/12/omml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<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]--><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="country-region" /><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PostalCode" /><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City" /><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="Street" /><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place" /><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="address" /><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName" /><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]--><style>
<!--a:link
        {mso-style-priority:99;}
span.MSOHYPERLINK
        {mso-style-priority:99;}
a:visited
        {mso-style-priority:99;}
span.MSOHYPERLINKFOLLOWED
        {mso-style-priority:99;}

 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 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;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Calibri;
        color:#1F497D;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="Section1">
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;
color:navy">What do you expect to happen in the scenario mentioned, assuming you are running
 only 1 rules session? Whatever you expect to happen in this case ( e.g. latest update wins ), you will need to implement in your persistence logic If you are using separate rule engines/instances.<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;
color:navy">by the way, have you looked at drools grid ? I haven&#8217;t used it, but appears
 to solve a similar problem that you are trying to &#8211; distributed computing.<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;
color:navy">-abhay</span></font><o:p></o:p></p>
</div>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">
<hr size="2" width="100%" align="center" tabindex="-1">
</span></font></div>
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size:10.0pt;
font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma"> rules-users-bounces@lists.jboss.org
 [mailto:rules-users-bounces@lists.jboss.org] <b><span style="font-weight:bold">On Behalf Of
</span></b>Swindells, Thomas<br>
<b><span style="font-weight:bold">Sent:</span></b> Tuesday, August 02, 2011 1:47 PM<br>
<b><span style="font-weight:bold">To:</span></b> <st1:PersonName w:st="on">Rules Users List</st1:PersonName><br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [rules-users] running multiple instance of rule engine</span></font><o:p></o:p></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:Calibri;color:#1F497D">I&#8217;m not sure I understand the question.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:Calibri;color:#1F497D">You have two totally independent rule engine on two different servers running with separate JVMs and sessions.
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:Calibri;color:#1F497D">You happen to share data between the two sessions by updating a database but drools has no knowledge of that (they are just java
 objects which happen to exist) and they certainly aren&#8217;t the same object on both servers.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:Calibri;color:#1F497D">Temporal reasoning and correlation of events will therefore only happen on the facts that are inserted into that processes working
 memory &#8211; there&#8217;s no way it could be any way else as it only know about itself, there could be 10 or 0 other processes running it won&#8217;t know the difference.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:Calibri;color:#1F497D"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:Calibri;color:#1F497D">The ideal method is to have an application design where each request is totally independent from all other requests (other than
 db state) and therefore you do exactly as you have described &#8211; there is no other state to share. If you have to share state between them you have a much bigger problem and you probably have to find some other way to partition up the data into separate blocks.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:Calibri;color:#1F497D"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:Calibri;color:#1F497D">Thomas<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="#1f497d" face="Calibri"><span style="font-size:11.0pt;font-family:Calibri;color:#1F497D"><o:p>&nbsp;</o:p></span></font></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size:10.0pt;
font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma"> rules-users-bounces@lists.jboss.org
 [mailto:rules-users-bounces@lists.jboss.org] <b><span style="font-weight:bold">On Behalf Of
</span></b>Neelesh Deo Dani<br>
<b><span style="font-weight:bold">Sent:</span></b> 02 August 2011 07:42<br>
<b><span style="font-weight:bold">To:</span></b> rules-users@lists.jboss.org<br>
<b><span style="font-weight:bold">Subject:</span></b> [rules-users] running multiple instance of rule engine<o:p></o:p></span></font></p>
</div>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<div id="yiv1207847827">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">Hi,<br>
I need a setup where multiple instance of drools rule engine will be running in different physical hosts. In each host, a web server (API) will be running which will receive an input event, process it and insert into rule engine (session) for rules execution
 on the same host. I'm using external persistent datastore. The objects will be populated from datastore before inserting into the session. After rule execution if there is any change in the state of the objects the same will be stored back to the datastore.
 The datastore calls are made outside the rule execution. <br>
In this scenario, if an event comes to one host and another event comes to a different host, how will the temporal reasoning or correlation of events work? What is the recommended way of deploying multiple instance of rule engine for scalability?<br>
Please help in this regard.<br>
<br>
Thanks &amp; Regards,<br>
Neel<o:p></o:p></span></font></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><o:p></o:p></span></font></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:10.0pt;
font-family:Calibri"><o:p>&nbsp;</o:p></span></font></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>
<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">
<hr size="2" width="100%" align="center">
</span></font></div>
<p class="MsoNormal"><font size="1" color="gray" face="Arial"><span style="font-size:
7.5pt;font-family:Arial;color:gray"><br>
**************************************************************************************<br>
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data
 may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.<br>
<br>
NDS Limited. Registered Office: <st1:Street w:st="on"><st1:address w:st="on">One London Road</st1:address></st1:Street>, Staines,
<st1:place w:st="on"><st1:City w:st="on">Middlesex</st1:City>, <st1:PostalCode w:st="on">
TW18 4EX</st1:PostalCode>, <st1:country-region w:st="on">United Kingdom</st1:country-region></st1:place>. A company registered in
<st1:country-region w:st="on">England</st1:country-region> and <st1:country-region w:st="on">
<st1:place w:st="on">Wales</st1:place></st1:country-region>. Registered no. 3080780. VAT no. GB 603 8808 40-00<br>
**************************************************************************************</span></font><o:p></o:p></p>
</div>
<br clear=all> This message contains information that may be privileged or confidential and is the property of the KPIT Cummins Infosystems Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Cummins Infosystems Ltd. does not accept any liability for virus infected mails.
</body>
</html>