[rules-users] Retrieving facts from a database

Greg Barton greg_barton at yahoo.com
Wed Jan 14 11:01:31 EST 2009


This is dependent on your data model, but in general you need objects to be in memory for them to be matched to each other.  i.e. if you have a rule that matches object type A to object type B, then the instances of A and B you want potentially matched need to be loaded into memory. 

Another alternative is to use the "from" keyword.  Input to "from" can come from anywhere.  YOu can match on objects loaded directly from the database.

http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html_single/index.html#d0e3926

>From the docs:
"One common example [of using from] is the integration with data retrieved on-demand from databases using hibernate named queries."

--- On Wed, 1/14/09, Bryan Basham <b_basham at yahoo.com> wrote:

> From: Bryan Basham <b_basham at yahoo.com>
> Subject: [rules-users] Retrieving facts from a database
> To: rules-users at lists.jboss.org
> Date: Wednesday, January 14, 2009, 9:38 AM
> Hi all,
> 
> I've been lurking on this alias for a while but I have
> not seen any questions about this so I thought I would
> ask...
> 
> Our application is DB intensive with potentially millions
> of rows in certain tables.  Currently, we are testing Drools
> in our app with small data sets that can easily be loaded
> into Java heap memory, but we are concerned about the
> scalability of our design.  My question is: Does Drools
> support a mechanism to dynamically load pages of facts into
> the working memory?  Or do you have to load *all* facts in
> at one time as we are currently doing it?
> 
> Any pointers (especially to web pages or documentation)
> would be appreciated.
> 
> Thanks,
> Bryan
> 
> 
>       _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users


      



More information about the rules-users mailing list