Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Rules Engine for Java

 
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm beginning to evaluate rules engines for use in a couple of upcoming projects and I'm wondering what success others have had using them.

Both of my projects will be implemented using Java and require processing multiple, complex rule sets. The rule sets will change occasionally so rather than hardcoding the rules in the business components, I'd like to externalize them.

Has anyone here implemented a project using a rules engine? Which one? How well did it work? Was it fast? Easy to maintain the rules? What issues did you encounter?

Jess looks promising, but the cost for a commercial license eliminates it immediately. I'm sure the licensing costs are reasonable, but my budget = $0. (I have to be nice -- I just noticed that Ernest is the forum moderator! )

Drools looks like a good choice. It's just joined with JBoss which seems to indicate that it will continue to be developed and supported for a while. I've downloaded Drools and I'm about to implement a test project to get a feel for how it works.

There are several other engines available as well.

Any insight or recommendations will be appreciated.

Regards.
 
Scott Johnson
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sorry that I haven't received any feedback about other's experiences with rules engines, but here's an update of what I found.

I've continued researching the available options and found Drools to be the best choice for my needs.

My criteria were:
1. the code base must be actively under development with semi-frequent releases
2. a mature, stable release must be available.
3. it must be available at no cost for commercial use.
4. it must be intuitive and easy to learn
5. it must have an active user community
6. it must be JSR-94 compliant

Of the 8 or so rules engines I reviewed only Drools met all of the criteria.

To test how easy Drools is to learn, I used it to implement a small test application. I found the API to be simple and the rules XML files easy to understand and create.

I'm going to continue developing the test application and try out some more Drools features, but barring any unforseen problems, Drools will be my choice.

I'll probably run a load test to see how fast Drools can be. Speed isn't one of my primary criteria because the number of rules I'll be processing will be relatively small (<100), but it'll be interesting to see what kind of throughput I can get.

Many thanks to Mark and the Drools team.
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Scott,

I am also in the process of evaluating some open source java rule engines.
I am particularly interested in the areas of speed and scalability.
If possible and if you had done your research in the above areas,please post your findings.

Thanks,
 
Scott Johnson
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven't had a chance do a complete performance analysis (memory, cpu profiles), but so far, it appears that the time Drools will take to process my rules will be insignificant compared to the time the application will spend doing things like executing database queries.

I haven't tried to process a large number of objects and rules. My application will have less than 100 rules operating on about 10 objects.

If you are going to be processing a large number of objects, you may be interested in this test by Andreas Schaefer.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, I'm trying to develop a rule engine too for my final yr project. I only have til... april the 5th to get it done.

Can u recommend sites i can look up or give me a few tips?

I'm currently trying to develop a rule engine in JESS but .. its not quite going the way I want it.

I simply want it to compare 2 facts and it just won't listen to me at all. sigh..
 
It means our mission is in jeapordy! Quick, read this tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic