Search code examples
javascriptingdroolsrulesrule-engine

Why should i use Drools?


I am no Drools expert. I have some familiarity with it though, by experimenting with it. I am unable to appreciate, why would i need it.

My Typical Applications are Business Web Applications. Yes they do have some amount of Rules. But those are implemented using Database Tables, SQL Queries, and a nice UI in for the Business-Users to modify the Rules. Rules are not arbitrary, they are carefully thought-thru before being put in Production.

My Business Users would never ever use a (Drools)Scripting Language to modify Anything. Let Alone Modify Rules. They are perfectly happy using UI Screens to modify Rules. Plus they can make a zillion syntax mistakes in a Drools files, if i let them anywhere near it.

Again
- Why should i use Drools in this scenario?
- There are Drools fanatics i have met who insist i should change all my code to make use of Drools.

So, is Drools useful? I am not sure.


Solution

  • Fanatics of all stripes should be questioned, no matter what topic they rave about.

    Data-driven decision tables are a perfectly good way to implement complex behavior. On the day it doesn't scale or perform to your requirements, perhaps you'll want to consider something else.

    I wouldn't want to make a technology swap in working production code unless I had a compelling reason. It would take a lot more than fan boy lobbying.

    If you're really interested, do a PoC and get some real data. If not, learn how to politely smile and ignore them.

    I've answered about this before:

    Rules Engine - pros and cons

    UPDATE: If it's your boss, and you can't dismiss, then make it interface based and try a Drools implementation in a PoC. If you're using Spring, inject one and then the other, measuring performance under a meaningful production rated load. Get some real data - maybe you'll both learn something.