How Can jBilling Help You?
Who’s Using jBilling?

“jBilling is a technology partner that we can trust.”
Kirk Kirschenbauer
Pureplay
See all testimonials >

Integration with JBoss Rules 5

The recent release of jBilling 2 had a nice surprise: it comes bundled with the latest release of Drools (also known as JBoss Rules). In the jBilling 1.x world, you had to install Drools in a separate application server. That meant having two separate application servers often running at the same time: JBoss 3 to run jBilling 1, and JBoss Web to run Drools. This was not only annoying but also ironic: jBilling 1 would not run on JBoss Web (which is based on JBoss 4), and Drools would not run on JBoss 3: so we need to JBosses ;)

A benefit of decoupling jBilling from JBoss, is that we can run Drools in the same application server as jBilling. And in the default package that you download from this site, that means Tomcat. In other words, the standard package comes with Tomcat with jBilling 2 and Drools 5 pre-installed.

Drools 5 is quite an improvement from Drools 4. The GUI (called BRMS or business rules management system before and now called Guvnor) has been improved substantially. This is important, because in our experience with deployments that involves a lot of rules, you end up spending significant time working with this GUI. Finding rules can be time consuming. You have to categorize them well and plan ahead on how to group them. The new GUI helps, there are more searching options and the overall navigation has been improved.

A nice addition is the management of decision tables. A decision table is nothing else than a spread sheet where every column represents a condition or an action. Every row is then a rule. They are very common for pricing of long distance calls: imagine a spread sheet where a column is the first digits of the number called, and another column is the price per minute. You then have one row per destination.

In Drools 4, you only had the option of uploading a table from Excel. This is not bad, and worked well. The spread sheet is uploaded into the BRMS where it is versioned and stored. If you want to know the current pricing for long distance call, you can login to the BRMS, download the spread sheet and open it up with Excel or Open Office.

Drools 5 adds the option of having the spread sheet native to Drools, rather than using Excel as a GUI and then uploading the resulting file. It is a nice option, and looks good. I yet have to see how well this works in practice when you need to deal with thousands of rows (as it is the case with long distance phone call rating).

These GUI improvements are probably important for jBilling users, from the Drools perspective they are minor compared with the new modules introduced in Drools 5. These include Fusion and Flow. Flow is just a name for the the workflow features that Drools 4 had, but in this new version this has been extended and the GUI (guvnor) now supports flow pretty nicely.

Fusion is related to event processing. This one is totally new to me, my guess is that they are applying the core rules engine to the processing of events. This is a common application for a rules engine, the Drools teams probably wants to make it easier and more 'official'.

In any case, seeing these new modules gives me the impression of Drools as a dynamic product that is evolving fast, getting better with every release. This is quite satisfying, considering that we did the strategic decision to use a rules engine for the implementation of complex logic a few years ago, when the availability of a robust open source rules engine was not a sure bet

Talking about rules, it is currently under way a significant effort by core jBilling developers to improve how rules are executed. This will impact the performance of jBilling significantly, specially for batch processes that are heavy consumers of rules: mediation and rating. Our next release, jBilling 2.1.0 will feature these improvements as its main offering.

Cheers,

Emiliano Conde
Lead Developer
jBilling.com