[rules-users] DROOLS with BRMS in J2EE Environment

psentosa psentosa at yahoo.com
Tue Aug 26 12:08:45 EDT 2008


Hi,

sorry for double posting now, I'm afraid my first post which I added to an
existing thread with similar topic, hasn't been looked at because of the
length of the thread :-) so, please apologize

The following problem:
I have some service implementation in my J2EE-based webapp for
calculating/processing inputs from user (I'll call these
calculating/processing service).
I try to integrate drools to do some checking on user input, before it is
saved into the DB and to generate some reports based on already saved data
respectively. The Rule Engine should just gives some feedback about the
rules being violated.
For the integration purpose, I'd like to implement several additional
services for the rule-checking purpose (I'll call this checking-service),
each of which uses RuleAgent to create RuleBase from BRMS. The reason why I
need several services is because I separate my rules in different packages,
depending on which calculating/processing service to use the checking
service, so I don't think all rules should always be included in the RETE
tree.

1st question here: is this the right strategy to separate the rule-checking
into some parts?

Now, for the checking itself, I use drools StatelessSession instance (The
(checking)service class for this is also a stateless session bean). Every
time calculation/processing service is called from the UI, it calls the
checking service, the checking service will do its parts with the Rule
Engine, gets the result, and pass it back to the calculating/processing
service.

2nd question: could such nested calls of services affect the performance of
the webapp (especially bcs it has to make additional call to BRMS for
creating the RuleAgent)

In the .properties file, I put the following options:
newInstance=true
poll=30
....
So, what I got on the console are the following messages, everytime my
checking service is contacted:
11:32:18,484 ERROR [STDERR] RuleAgent(ruleconfig) INFO (Fri Aug 22 11:32:18
CEST 2008): Applying changes to the rulebase.
11:32:18,484 ERROR [STDERR] RuleAgent(ruleconfig) INFO (Fri Aug 22 11:32:18
CEST 2008): Creating a new rulebase as per settings.
11:32:18,484 ERROR [STDERR] RuleAgent(ruleconfig) INFO (Fri Aug 22 11:32:18
CEST 2008): Adding package called mypackage1

The questions:
- why the ERROR [STDERR]?Is there any problem the RE is trying to show?
- Rules should be updateable, but less regularly (probably several times /
year). I set newInstance=true so that the webapp always gets the most
updated rules, but seeing that everytime calls are made, new rulebase is
created as well, I'm worried that there will be too many ressources in use.
Or am I wrong? Is there any alternative how to do this more efficiently?
- what is actually "poll" for? If I already get a fresh ruleagent for every
call, do I still need this one?

The webapp is still in testing phase, but later it should be used in a kind
of mini-cluster as well. Is BRMS also suitable in cluster-environment? Or is
there any limitation for the purpose?

Many thanks for any idea/critics/suggestions/tips, etc. Really appreciate
any response!

Regards


-- 
View this message in context: http://www.nabble.com/DROOLS-with-BRMS-in-J2EE-Environment-tp19165098p19165098.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list