views:

32

answers:

0

Hi

I'm currently teaching myself Drools Expert/Flow as well as GWT. I want to use Drools Flow as an event/command bus and business rule engine to achieve loose coupling between different parts of the application.

So far I've gotten both Expert and Flow working from my test cases, but I have a hard time figuring how to best implement Flows within a web container.

Should I put all the scaffolding into an Stateless Session EJB and let each request set up everything from scratch and then run the flows/rules? This seems like a waste of resources to me. Can I instead store a single knowledge session and share that sessions between web requests, accessing it concurrently, would that scenario scale and is it thread safe (my guess is no)? Is pooling knowledge sessions a good idea?

What I'm asking for is basically if there is any best practices for the above? The documentation and examples, while otherwise quite good, are not clear on these particular points.

I did read something about Drools Grid, not sure if that would solve my problem and that seems to be under development. If my questions are unclear, please say so.

BR Magnus