I've tried Hamurappi about 2 years ago to build a payroll-like application. This hasn't worked out quite well, and I've encountered a few bugs along the way (including several race conditions). So I've abandoned Hamurappi and wrote my own custom code (which also hasn't worked out that well).
This year I've tried Drools, but got burned by its inadequate language and flaky Truth Maintanance System which was not tested by anything more complex than a textbook sample. Drools might be good for a lot of simple rules, but I found myself spending more time trying to express rules in DRL then eveyrthing else combined.
Besides, Drools are slow. All the examples I've seen so far are "add an item into working memory and apply rules to it" while I want "load a million of items into working memory and let the engine sort it out".
Can Hamurappi allow to quicly build my own engine, probably reusing some of Hamurappi's infrastructure?
You're applying the wrong tool to solve the problem. If you really have a million or millions of facts/objects into a rule engine, it's going to take time. Your options are using a query driven approach like backward chaining engine, translate rules to queries and use data driven rules.
In theory, backward chaining is "query-like" and doesn't materialize all partial matches. The downside is you have to understand how to write effective rules. Translating rules to SQL queries isn't that hard, but it does take time to do. There's prior art in this area dating back to late 90's. I know someone that did their Phd on that topic.
Using data driven rules, you can selectively load data as needed, rather than load all million objects up front. Having built systems that had to reason over 1 million facts for an order management system, you have to be smart about loading data. Don't try to load everything up front and use the rules to only load what you need.
The final option is to buy a license of OPSJ, which can load 1 million facts "way faster" than any other rule engine out there. The bottom line is, take time to study production rule engines, forward chaining, backward chaining, pattern matching and logic programming. Once you have a good understanding of the domain, it will be easier to solve challenging issues like reasoning over 1 million objects. The downside is it takes years to acquire depth in these areas of study. If you have a specific question, feel free to email me woolfel AT gmail DOT com.