<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:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (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:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@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","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></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="WordSection1">
<p class="MsoPlainText">The &quot;rules as a service&quot; app I was talking about for option #2 is using spring and it is a RESTful webapp, but dedicated to handle &quot;rules requests&quot;.<o:p></o:p></p>
<p class="MsoPlainText">There is no DRL handled by the &quot;rules service&quot; , the DRL / decision tables resides outside this &quot;rules service&quot; app.
<o:p></o:p></p>
<p class="MsoPlainText">It is a java app devoted to take &quot;rules request&quot; from other applications and has a proxy to GUVNOR and wraps the returned result ( I use JSON) and<o:p></o:p></p>
<p class="MsoPlainText">Returns to the caller. <o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">So, it is java code can use unit tests .... but only deals with a special task of taking &quot;rules&quot; related request and responses by one or more applications. Architecturally, it is a &quot;Horizontal&quot; layer, serving &quot;Verticals&quot;.<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">I am not quite convinced on the &#8216;single failure&#8217; argument &#8230;. as reason against option #2.
<o:p></o:p></p>
<p class="MsoPlainText">Yes, architecture determines &#8230;. is it to serve one application or multiple?<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">Genene<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
<b>On Behalf Of </b>adarsh.chaini@hsbcib.com<br>
<b>Sent:</b> Friday, September 06, 2013 11:28 AM<br>
<b>To:</b> Rules Users List<br>
<b>Cc:</b> Rules Users List; rules-users-bounces@lists.jboss.org<br>
<b>Subject:</b> Re: [rules-users] Integrate Drools with Java application, need recommendations<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">I think it all depends on the architecture and the type of &nbsp;application and the usage of &nbsp;rules with in those applications.</span>
<br>
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Having a separate server adds another single point of failure and latency.</span>
<br>
<br>
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">The applications that are very distributed in nature and spread across 100's of JVM's would like the business logic more close to the data present in those nodes/JVM's.</span>
<br>
<br>
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Thanks<br>
&amp;<br>
Regards,<br>
Adarsh <br>
<br>
SENIOR LEAD DEVELOPMENT SPECIALIST<br>
SCJP, SCWCD <br>
FINANCE TECHNOLOGY<br>
HSBC BANK PLC HBEU<br>
8 Canada Square,Canary Wharf,<br>
London,E14 5HQ,United Kingdom<br>
------------------------------------------------------<br>
Phone &nbsp; &nbsp; &nbsp; &#43;44 207914720<br>
Mobile &nbsp; &nbsp; &nbsp;07595530105<br>
Email. &nbsp; &nbsp; &nbsp;<a href="mailto:adarsh.chaini@hsbcib.com">adarsh.chaini@hsbcib.com</a><br>
________________________________</span> <br>
<br>
<o:p></o:p></p>
<table class="MsoNormalTable" border="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#5F5F5F">From:</span>
<o:p></o:p></p>
</td>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Genene Geda &lt;<a href="mailto:ggeda@ghx.com">ggeda@ghx.com</a>&gt;</span>
<o:p></o:p></p>
</td>
</tr>
<tr>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#5F5F5F">To:</span>
<o:p></o:p></p>
</td>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt;</span>
<o:p></o:p></p>
</td>
</tr>
<tr>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#5F5F5F">Date:</span>
<o:p></o:p></p>
</td>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">06/09/2013 16:22</span>
<o:p></o:p></p>
</td>
</tr>
<tr>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#5F5F5F">Subject:</span>
<o:p></o:p></p>
</td>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Re: [rules-users] Integrate Drools with Java application, need recommendations</span>
<o:p></o:p></p>
</td>
</tr>
<tr>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#5F5F5F">Sent by:</span>
<o:p></o:p></p>
</td>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a></span><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" noshade="" style="color:#A0A0A0" align="center">
</div>
<p class="MsoNormal"><br>
<br>
<br>
<tt><span style="font-size:10.0pt">My preference is option #2 - REST based</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
<tt>Why? That way you will have &quot;rules as a service&quot; and you can serve more than one application.</tt><br>
<tt>Your interface to the GUVNOR repository would be from this &quot;rules service&quot; server instead of each application duplicating the same code.</tt><br>
<br>
<tt>I am building &quot;rules service&quot; as a horizontal for all applications to use it when they need it. In multi-applications environment, standing &quot;rules as a service&quot; is in my opinion - the best solution.
</tt><br>
<br>
<tt>&gt;From the limited test I did, the cost of invoking these RESTful &quot;rules services&quot; is minimal than the cost to call GUVNOR to load the knowledge base.</tt><br>
<tt>So if you are using GUVNOR as a rules repository ( which is a key requirement to achieve separation of &quot;business rules/ logic&quot; from application code base - and to gradually engage the business analysts to fully or partially own rules authoring) .... from
 my limited experience so far, option #2 is the best approach.</tt><br>
<br>
<tt>Let's know what you decide eventually and the challenges / opportunities ....</tt><br>
<br>
<tt>Genene </tt><br>
<br>
<tt>-----Original Message-----</tt><br>
<tt>From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [</tt></span><a href="mailto:rules-users-bounces@lists.jboss.org"><tt><span style="font-size:10.0pt">mailto:rules-users-bounces@lists.jboss.org</span></tt></a><tt><span style="font-size:10.0pt">]
 On Behalf Of Stephen Masters</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
<tt>Sent: Thursday, September 05, 2013 6:00 PM</tt><br>
<tt>To: Rules Users List</tt><br>
<tt>Subject: Re: [rules-users] Integrate Drools with Java application, need recommendations</tt><br>
<br>
<tt>My preference is option 1 ... using a Spring application with a class which wraps a knowledge base / session. This has the advantage that sometimes I really do want to be able to mix up rules results with logic that I want to implement in Java code.</tt><br>
<br>
<tt>There's obviously a performance impact if you additionally marshall to a separate Drools server, but not a huge amount. The decision should be more about whether you expect all business logic to be implemented in the Drools rules or a combination of rules
 and business logic code. </tt><br>
<br>
<tt>Steve</tt><br>
<br>
<br>
<tt>On 6 Sep 2013, at 00:15, srikanthmalli &lt;<a href="mailto:srikanthmalli@gmail.com">srikanthmalli@gmail.com</a>&gt; wrote:</tt><br>
<br>
<tt>&gt; Hi,</tt><br>
<tt>&gt; </tt><br>
<tt>&gt; I am trying Drools/Guvnor for very first time, we are planned to do </tt><br>
<tt>&gt; Rule Authoring in Guvnor, compile, build and download the package to </tt><br>
<tt>&gt; &quot;Rule Package Directory&quot;.</tt><br>
<tt>&gt; </tt><br>
<tt>&gt; Now the question I am having is, what is the best way to integrate </tt><br>
<tt>&gt; Drools with our Java application?</tt><br>
<tt>&gt; Option 1) Build the knowledge agent and start inserting the facts into </tt>
<br>
<tt>&gt; memory for rule evaluation in our application. In this case Drools </tt><br>
<tt>&gt; engine use JVM same as application JVM.</tt><br>
<tt>&gt; Option 2) Have a Drools Server which builds the knowledge agent, and </tt><br>
<tt>&gt; application can send the requests to Drools Server for rule evaluation </tt>
<br>
<tt>&gt; using REST API. Rules will be executed in separate JVM than application JVM.</tt><br>
<tt>&gt; </tt><br>
<tt>&gt; I also wondering is there any performance (in terms of execution time) </tt>
<br>
<tt>&gt; difference between the options mentioned above?</tt><br>
<tt>&gt; </tt><br>
<tt>&gt; Could you please also let me know if I am thinking in the right direction?</tt><br>
<tt>&gt; </tt><br>
<tt>&gt; -Sri</tt><br>
<tt>&gt; </tt><br>
<tt>&gt; </tt><br>
<tt>&gt; </tt><br>
<tt>&gt; --</tt><br>
<tt>&gt; View this message in context: </tt><br>
<tt>&gt; </tt></span><a href="http://drools.46999.n3.nabble.com/Integrate-Drools-with-Java-applicati"><tt><span style="font-size:10.0pt">http://drools.46999.n3.nabble.com/Integrate-Drools-with-Java-applicati</span></tt></a><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
<tt>&gt; on-need-recommendations-tp4025834.html</tt><br>
<tt>&gt; Sent from the Drools: User forum mailing list archive at Nabble.com.</tt><br>
<tt>&gt; </tt><br>
<tt>&gt; _______________________________________________</tt><br>
<tt>&gt; rules-users mailing list</tt><br>
<tt>&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></tt><br>
<tt>&gt; </tt></span><a href="https://lists.jboss.org/mailman/listinfo/rules-users"><tt><span style="font-size:10.0pt">https://lists.jboss.org/mailman/listinfo/rules-users</span></tt></a><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
<br>
<br>
<tt>_______________________________________________</tt><br>
<tt>rules-users mailing list</tt><br>
<tt><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></tt><br>
</span><a href="https://lists.jboss.org/mailman/listinfo/rules-users"><tt><span style="font-size:10.0pt">https://lists.jboss.org/mailman/listinfo/rules-users</span></tt></a><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
<br>
<tt>_______________________________________________</tt><br>
<tt>rules-users mailing list</tt><br>
<tt><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></tt><br>
</span><a href="https://lists.jboss.org/mailman/listinfo/rules-users"><tt><span style="font-size:10.0pt">https://lists.jboss.org/mailman/listinfo/rules-users</span></tt></a><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
</span><br>
<br>
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><br>
<br>
************************************************************<br>
HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate
 of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as
 well as internal systems, controls and procedures to identify and manage conflicts of interest.<br>
<br>
HSBC Bank plc<br>
Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom<br>
Registered in England - Number 14259<br>
Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority<br>
************************************************************<br>
<br>
<br>
************************************************************<br>
HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate
 of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as
 well as internal systems, controls and procedures to identify and manage conflicts of interest.<br>
<br>
HSBC Bank plc<br>
Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom<br>
Registered in England - Number 14259<br>
Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority<br>
************************************************************<br>
<br>
<br>
************************************************************<br>
HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate
 of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as
 well as internal systems, controls and procedures to identify and manage conflicts of interest.<br>
<br>
HSBC Bank plc<br>
Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom<br>
Registered in England - Number 14259<br>
Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority<br>
************************************************************<br>
</span>----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group &quot;HSBC&quot; for the information of the addressee only and should not be reproduced and/or distributed to any other
 person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based
 on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy.<o:p></o:p></p>
</div>
</body>
</html>