100K concurrent threads tends to be a problem, with or without Drools. There are<br>several strategies for limiting this, but this is not a Drools topic. <br><br>Hint 1: You can limit connects on sockets.<br>Hint 2: Java thread pool, a design pattern.<br>
<br>-W<br><br><br><br><div class="gmail_quote">On 19 April 2011 18:13, Sumeet Karawal <span dir="ltr">&lt;<a href="mailto:sumeet.karawal@tcs.com">sumeet.karawal@tcs.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Thanks a lot Randhish!!!<br>
<br>
Stateful sessions will have to be disposed. But what if the sessions are<br>
taking too long, same with the case of stateless sessions, then what to do<br>
in that case.<br>
<br>
Also in the multi- threaded environment, if I have 10 - 100 Ks of threads,<br>
will the rule engines performance be still better.<br>
<div class="im"><br>
Thanks &amp; Regards,<br>
Sumeet Karawal<br>
Mailto: <a href="mailto:sumeet.karawal@tcs.com">sumeet.karawal@tcs.com</a><br>
<br>
<br>
<br>
</div>  From:       Randhish Raghavan &lt;<a href="mailto:Randhish_Raghavan@mindtree.com">Randhish_Raghavan@mindtree.com</a>&gt;<br>
<br>
  To:         Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt;<br>
<br>
  Date:       04/19/2011 08:51 PM<br>
<br>
  Subject:    Re: [rules-users] Fw: Some Querries on Drools<br>
<br>
  Sent by:    <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a><br>
<div><div></div><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
Hi,<br>
<br>
I am quite new to drools but I will try to answer your questions.<br>
<br>
I don&#39;t think Drools will cause your application to crash if you ensure<br>
1. You develop rules that will not result in infinite loops.<br>
2. Dispose sessions if you are using Stateful sessions.<br>
<br>
Basically, you would want to create the Knowledge base once i.e. during<br>
application startup. You will create a new Session (not an expensive<br>
operation) for every request. In this scenario it will be better to use<br>
stateless sessions as you do not have to worry about disposing them.<br>
<br>
However, if you want to use statefull sessions, you might want to write a<br>
set of wrapper classes that provide api&#39;s to manage the statefull session<br>
and execute rules. Developers will only be allowed to access api&#39;s that<br>
execute rules and will not have access to api&#39;s that create and dispose a<br>
session.<br>
<br>
To you next question on making changes to rules,<br>
<br>
You have to create a KnowledgeAgent that checks if the rule resource has<br>
been modified at configured intervals. The rule resource (drl,pkg etc) can<br>
exist on the file system or you want to try to configure rules in guvnor.<br>
Guvnor is a GUI tool that allows you to manage rules.<br>
<br>
Regards,<br>
Randhish<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [<br>
mailto:<a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>] On Behalf Of Sumeet Karawal<br>
Sent: Tuesday, April 19, 2011 2:53 PM<br>
To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
Subject: [rules-users] Fw: Some Querries on Drools<br>
<br>
<br>
Hi Everybody,<br>
<br>
I had posted this earlier. It would be very greatful if anybody could help<br>
me on these queries, any suggestions or any document that I can refer to.<br>
<br>
Thanks and Regards,<br>
Sumeet Karawal<br>
Mailto: <a href="mailto:sumeet.karawal@tcs.com">sumeet.karawal@tcs.com</a><br>
<br>
<br>
  From:       Sumeet Karawal/MUM/TCS<br>
<br>
  To:         <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<br>
  Date:       04/18/2011 06:58 PM<br>
<br>
  Subject:    Some Querries on Drools<br>
<br>
<br>
<br>
<br>
<br>
Hello All,<br>
<br>
I have some queries regarding use of drools as rule engine for my<br>
Application. It would be very helpful if I get some guidance regarding<br>
these:<br>
<br>
1) I have an application in which a user logs in, and according to his<br>
profile he is provided with some benefits, and rule engine check for the<br>
eligibility criteria. But if hundreds of thousands of user will log in at<br>
same time, then what will be the performance accordingly. Like, these<br>
concurrent users hitting the server, and so many threads will be generated<br>
and many number of rules will be fired in the session. Will this hamper the<br>
performance of Rule Engine.<br>
<br>
2) Suppose I have an application using drools. I create EAR / WAR file of<br>
that application and deploy it on some other system. Would it be still<br>
possible for me to change the rules on the fly. Or some dependencies might<br>
have to be managed.<br>
<br>
3) How can we manage sessions in drools? Suppose we are having different<br>
stateful sessions in our application, but time consumption when we<br>
fireAllRules() exceeds the expected time. So is there a mechanism to kill,<br>
restart the session in drools. Could I get some help/document regarding<br>
session Management on drools.<br>
<br>
<br>
Thanks &amp; Regards,<br>
Sumeet Karawal<br>
Mailto: <a href="mailto:sumeet.karawal@tcs.com">sumeet.karawal@tcs.com</a><br>
<br>
=====-----=====-----=====<br>
Notice: The information contained in this e-mail<br>
message and/or attachments to it may contain<br>
confidential or privileged information. If you are<br>
not the intended recipient, any dissemination, use,<br>
review, distribution, printing or copying of the<br>
information contained in this e-mail message<br>
and/or attachments to it are strictly prohibited. If<br>
you have received this communication in error,<br>
please notify us by reply e-mail or telephone and<br>
immediately and permanently delete the message<br>
and any attachments. Thank you<br>
<br>
<br>
<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>
<br>
________________________________<br>
<br>
<a href="http://www.mindtree.com/email/disclaimer.html" target="_blank">http://www.mindtree.com/email/disclaimer.html</a><br>
<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>
<br>
<br>
<br>
=====-----=====-----=====<br>
Notice: The information contained in this e-mail<br>
message and/or attachments to it may contain<br>
confidential or privileged information. If you are<br>
not the intended recipient, any dissemination, use,<br>
review, distribution, printing or copying of the<br>
information contained in this e-mail message<br>
and/or attachments to it are strictly prohibited. If<br>
you have received this communication in error,<br>
please notify us by reply e-mail or telephone and<br>
immediately and permanently delete the message<br>
and any attachments. Thank you<br>
<br>
<br>
<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>
</div></div></blockquote></div><br>