[rules-users] Rule to load facts with pagination

Greg Barton greg_barton at yahoo.com
Tue May 1 12:22:45 EDT 2012


I agree with Wolfgang that we need more information, but here's two general pieces of advice:

1) If the object loading involves little or no business logic then do it from java. (i.e. it's "load 10000 objects and go")

2) It's usually more efficient to dispose of a session than to remove all objects from a session's working memory and reuse it.  So if that fits your needs it's the best route.  And if objects can be arbitrarily divided up in that way the problem is highly parallel, and you can take advantage of that by running the sessions in multiple threads/hosts.

--- On Mon, 4/30/12, Wolfgang Laun <wolfgang.laun at gmail.com> wrote:

> From: Wolfgang Laun <wolfgang.laun at gmail.com>
> Subject: Re: [rules-users] Rule to load facts with pagination
> To: "Rules Users List" <rules-users at lists.jboss.org>
> Date: Monday, April 30, 2012, 2:44 PM
> 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 at gmail.com>
> 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 lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> _______________________________________________
> 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