Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

could drools reason over data stored in a relational database (using HIbernate for example)

i have to achieve an application with drools but, it appears that DROOLS can not reason over a big number of objects simultaneously. i want to know if it could reason over data stored in a relational database and not in the workingMemory.

thanks for any help :)

like image 434
fennou Avatar asked Apr 03 '12 11:04

fennou


1 Answers

Your question is quite broad. The answer is in order to reason over data, unless you are working with stored procedures, any application (drools or not) will need to load the data into the JVM. The data can then, in a Drools application, be inserted into the working memory (please note that this does not cause any copy operations as drools works with standard application POJOs as facts) or it can be fetched on-demand by rules using the "from" conditional element. Hibernate also uses POJOs and Drools has no problems working with them.

"DROOLS can not reason over a big number of objects simultaneously"

Not sure what you mean by that? how much is a big number? I personally worked with a few drools applications that used over a million facts simultaneously in each instance of the working memory, with average response time for rule execution in the 100s ms order. Here you can see a presentation of a consultant that worked on a project where rules had to query and reason over historical data of over 30 million records in real time: http://vimeo.com/27209589 . He used a noSQL database for that.

Large applications will require more care while designing the architecture, of course, but this is true for Drools as well as for any technology. If you detail your use case, we can give you more specific advice. Also recommend checking the Drools mailing list as there are a ton of good advice for application design there.

Hope it helps to clarify.

like image 85
Edson Tirelli Avatar answered Sep 23 '22 23:09

Edson Tirelli