My preference is option #2 - REST based Why? That way you will have "rules as a service" and you can serve more than one application. Your interface to the GUVNOR repository would be from this "rules service" server instead of each application duplicating the same code.
I am building "rules service" as a horizontal for all applications to use it when they need it. In multi-applications environment, standing "rules as a service" is in my opinion - the best solution. >From the limited test I did, the cost of invoking these RESTful "rules >services" is minimal than the cost to call GUVNOR to load the knowledge base. So if you are using GUVNOR as a rules repository ( which is a key requirement to achieve separation of "business rules/ logic" from application code base - and to gradually engage the business analysts to fully or partially own rules authoring) .... from my limited experience so far, option #2 is the best approach. Let's know what you decide eventually and the challenges / opportunities .... Genene -----Original Message----- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Stephen Masters Sent: Thursday, September 05, 2013 6:00 PM To: Rules Users List Subject: Re: [rules-users] Integrate Drools with Java application, need recommendations My preference is option 1 ... using a Spring application with a class which wraps a knowledge base / session. This has the advantage that sometimes I really do want to be able to mix up rules results with logic that I want to implement in Java code. There's obviously a performance impact if you additionally marshall to a separate Drools server, but not a huge amount. The decision should be more about whether you expect all business logic to be implemented in the Drools rules or a combination of rules and business logic code. Steve On 6 Sep 2013, at 00:15, srikanthmalli <srikanthma...@gmail.com> wrote: > Hi, > > 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 > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Integrate-Drools-with-Java-applicati > on-need-recommendations-tp4025834.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users