[rules-users] Using the drools as the backend engine for a service

Anstis, Michael (M.) manstis1 at ford.com
Mon Feb 4 04:05:58 EST 2008


IMHO, you might achieve better scalability and resilience if you can make
the working memory stateless.
 
I assume your "service" to be a web-service over stateless-HTTP and not a
service exposed over a stateful protocol.
 
Cheers,
 
Mike


  _____  

From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Jai Vasanth
Sent: 01 February 2008 22:05
To: Rules Users List
Subject: Re: [rules-users] Using the drools as the backend engine for a
service


I must have not been clear, yes I was planning on instantiating the rulebase
when the service starts and instantiating a new session for every request.



ONCE:
 
 RuleBase ruleBase = RuleBaseFactory.newRuleBase();
ruleBase.addPackage( pkg );

PER REQUEST:
Stateful session = ruleBase.newStatefulSession();  (Is this what you were
referring to as working memory ? )


I hope that looks ok.

Thanks

Jai 

On Feb 1, 2008 1:37 PM, Michael Rhoden <mrhoden at franklinamerican.com> wrote:


You would likely NOT want to create a rulebase per session. Most people
create working memory per session. Rulebases should only be loaded once per
server (context) in my opinion, and you reload it as rules changes. Loading
a rulebase loads rules from a file, and orders your rete tree. For our
installation that takes several minutes.

 

Rulebase = once

Working memory = per user/transaction

 

-Michael

 


  _____  


From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Jai Vasanth
Sent: Friday, February 01, 2008 3:23 PM
To: Rules Users List
Subject: [rules-users] Using the drools as the backend engine for a service

 

Hi,

 I am planning on using Drools as the rules engine for a service that I am
building. I am considering instantiating a stateful session for every
request to the service. The RuleBase would be created when the service
starts. Is this the correct way to  go about incorporating Drools in a
service ? Is session creation an expensive process and if so are there other
efficient ways of doing so ?



Thanks 

Jai 


_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080204/db103480/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4159 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20080204/db103480/attachment.bin 


More information about the rules-users mailing list