0
votes

I am trying Drools/Guvnor for very first time, we are planned to do Rule Authoring in Guvnor, compile, build and download the package to “Rule Package Directory”.

Now the question I am having is, what is the best way to integrate Drools with our Java application? Option 1) Build the knowledge agent and start inserting the facts into memory for rule evaluation in our application. In this case Drools engine use JVM same as application JVM. Option 2) Have a Drools Server which builds the knowledge agent, and application can send the requests to Drools Server for rule evaluation using REST API. Rules will be executed in separate JVM than application JVM.

I also wondering is there any performance (in terms of execution time) difference between the options mentioned above?

Could you please also let me know if I am thinking in the right direction?

-Sri

1

1 Answers

0
votes

I've tested both your possibilities and saw no difference in performance BUT my tests were performed with only a few rules, I didn't really do stress tests. I don't know if the execution time scales well.

What I use is actually a mixture of both your options: I do everything in the same JVM, build the knowledge base (takes a few seconds) and insert facts into memory to trigger the rules.

Either way, you're in the right direction :)