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