We are a user experience design and software development firm
Hire us to design your site, build your application, serve billions of users and solve real problems.
While JBoss Rules 3.0.x has been a great step from its predecessor (the unfortunately named Drools) -- providing a rule editing environment, universal and existential quantifiers (the "not" A is the same as "for all" ~A), and Domain Specific Languages (DSL's) -- there were still a few things missing. I've watched the progress on 3.1 with barely contained excitement and impatience, but the result has been worth the wait. The 3.1 M1 drop contains operations on collections:
rule "Find interesting crash events, with 10 or more port scans within a 1 day window" when $crash : OutageEvent( eventType == OutageEvent.SERVER_CRASH) ArrayList( size > 9) from collect ( HackEvent(hackType == HackEvent.PORT_SCAN, $date : eventDate -> (DateHelper.withinDayWindow($crash.getEventDate(), $date, 1)))) then suspicious.add($crash); end
There is also the accumulate operator, which is even more powerful than the collect operator. The documentation has lagged a little behind (it isn't a full on release, after all), but you can see some examples of it's use here. I find that I use these sorts of collection operations quite a bit. That being said, the above rule isn't terribly efficient. If you have about 50 of those rules and lots of events of both categories, you will run into some cross-product hell (sort of like a poorly thought out database join). I'll show some ways of making this sort of rule more efficient in an upcoming entry.
Finally, the system now in theory allows better debugging of rulesets. The various views into the working memory have been around for a while. See below for some of my issues.
A few nits that I'm sure the JBoss Rules team will work out:
The best thing about this latest version of JBoss Rules is, of course, that I can now start developing non-trivial examples and publishing them without having to constantly caveat that "this feature is present in Blaze and ILog, but not here." An even more interesting question is this: since JBoss Rules is getting close on being a reasonable alternative to some of the commercial products, will what happened in the database arena with mySQL also happen in the BRE arena? Will costs come down, interoperability increase? Will the commercial vendors concentrate on service, support and high end features? Will these same vendors become more open and share more information with the public? I don't think BRE's will ever be as widespread as RDBMS's, but I think the same dynamics might apply.
Some things to look forward to that I hope the JBoss Rules team is thinking about: rule management, specifically rule repositories and deployment management, e.g. revision control for rule sets and deployment of rule modifications to distributed, live production engines; Rule analytics, e.g. analysis of a rule set to see if it contains likely problems (infinite loops, possibly bad logic, etc.), and stats on actual rule execution, performance, etc.
Topics: Business Rules, Drools, JBoss Rules
The guys over at JBoss Rules are starting to build a little community of practice over in their Wiki.
There's a ton of good stuff over there, including a link to this tutorial by
Topics: Drools, JBoss Rules, Patterns
I have to apologize in advance. I'm in the middle of squeezing out a book chapter and haven't had time to tackle any of the BRE articles on my writing TODO list. So today I'm going to have to do what I usually hate to do -- become a blog echo chamber. The post I want to alert you to is one posted almost a year ago by Charles Young, entitled Microsoft's Rule Engine Scalability Results - A comparison with Jess and Drools. The article claims to show that Microsoft's BRE cannot be criticized about not implementing RETE properly based on MS's published test results. That's a long way to go for such an ephemeral point.
I don't recommend the article because of the claims it makes, but rather because it both demonstrates the use of three different BRE's through actual code samples, and it provides an approach to benchmarking and comparing BRE's for scalability and performance. I'm a firm believer in benchmarking BRE's based on your actual use cases rather than on abstract worst-case scenarios like Miss Manners. Read through this blog entry. Even if his approach is flawed, as I believe it is, he deserves full credit for publishing the full code to his test and opening it up to public scrutiny.
Topics: Benchmarking, Business Rules, Drools, JBoss Rules, Jess
Hire us to design your site, build your application, serve billions of users and solve real problems.