[rules-users] Rule to load facts with pagination

gboro54 gboro54 at gmail.com
Tue May 1 13:07:38 EDT 2012


Not sure if I am right but I believe he has a memory restriction which forces
him not to be able to load a full result set from a query and then feed this
objects into the engine as facts. Unless you have some complicated logic I
would probably do the loading logic outside of the rules. Feed X number of
your objects into your session, fire the rules in the session, then dispose
of the session and start all over for the next X objects. 


laune wrote
> 
> Chances are high that you aren't asking the right question but based
> on the meagre information you provide I can't even propose a better
> question.
> 
> Consider not only loading but also unloading.
> 
> Does the logic for loading the next bunch of facts warrant rules?
> 
> -W
> 
> 
> On 30/04/2012, mariofox <mariofox@> wrote:
>> Hi.
>>
>> I'm running drools in a project with millions of facts to process. My
>> memory
>> doesn't allow me to load all of my facts, so I have to load N objects at
>> once, then start over with next N objects, and so on.
>>
>> Is it a good idea to let Drools to manage Pagination? I mean, create
>> rules
>> in Drools with the purpose of loading facts?, or should I have to do this
>> by
>> executing a Drools session from java in a loop?. My main goal is
>> performance.
>>
>> Thanks!
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/Rule-to-load-facts-with-pagination-tp3951591.html
>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>> _______________________________________________
>> rules-users mailing list
>> rules-users at .jboss
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
> _______________________________________________
> rules-users mailing list
> rules-users at .jboss
> https://lists.jboss.org/mailman/listinfo/rules-users
> 


--
View this message in context: http://drools.46999.n3.nabble.com/Rule-to-load-facts-with-pagination-tp3951591p3953288.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list