[rules-users] How to avoid stateless session rule fire on every fact ?

Stephen Masters stephen.masters at me.com
Wed Aug 7 08:55:18 EDT 2013


Only a few minutes of our time spent responding I suspect. I was more concerned that you could easily spend days developing an inappropriate solution which would need to be re-written. :)

As a rule, when asking questions here, it's far better to explain the problem you're trying to solve. Without that context, it's very difficult for anyone to provide useful answers.

On a side note, when you do have a large number of 'static data' facts to work with, and want to make multiple queries, you would probably be better off using a stateful session. That way, you take a hit for compiling rules and inserting data facts up front. Subsequently you can insert a query fact, and get a response fast. If you're just validating something then you can retract it. Using this technique I have reduced application request processing times from >30 seconds to a few hundredths of a second.

Steve


On 7 Aug 2013, at 13:10, viraj <mayuraviraj at gmail.com> wrote:

> Thanks for the help. This was a my project ( first one which use Drools ). I
> changed the design to remove rules for each book and removed book from
> facts. Now the system only reason with necessary facts. This performs
> better. Sorry to waste your time. But i learned lots from here. 
> 
> 
> 
> --
> View this message in context: http://drools.46999.n3.nabble.com/How-to-avoid-stateless-session-rule-fire-on-every-fact-tp4025383p4025405.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




More information about the rules-users mailing list