[rules-users] [rule-users]Drools Fact Management with Large Dataset in RDBMS

CW cw.kong at dmahk.com
Thu Mar 15 00:26:36 EDT 2012


Thank you in advance for your time reading this post first.

I have to make my rules work with databases with TB of data, so fact
management become a major issue when I design my system. Currently I have
several main programs which use both stateful and stateless sessions. I
would like to collect some good practices to manage the insertion and
disposal of facts so that I can keep my working memory healthy. Below are
some of my findings in this forum:

1. Insert only relevant facts into working memory with the use of "data
preparation" rule together with Drools pipeline (hibernate, mybatis, etc).
An excellent example from manstis in the post
http://drools.46999.n3.nabble.com/Applying-rules-on-the-data-in-an-RDBMS-td2468317.html#a2491888
---------------------
rule "bootstrap"
salience -100
when
    $list : List( ) from placeHolder.namedQuery("Smurfs")
then
    for(ExternalObject o : $list ) {
        insert( o );
    }
end
--------------------

2. Use "insertlogical" instead of "insert" when inserting facts in rule

3. Implement "garbage collection" rule to clean up unwanted facts



I would like to ask:

1. if there are any other suggestion on optimizing fact management?
2. is there a way for the rule engine to directly operate on data in
database (perhaps with some other plugin?)

Thanks again!

--
View this message in context: http://drools.46999.n3.nabble.com/rule-users-Drools-Fact-Management-with-Large-Dataset-in-RDBMS-tp3827838p3827838.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list