Hi!
> 1. can the same rete engine process requests from multiple threads
> simultaneously or should I create a Rete engine pool?
You need to differentiate between
(1) asserting facts
(2) running the engine using Rete.run() or Rete.runUntilHalt()
Facts can be asserted by multiple concurrent threads. On the other hand, only a single
thread can run the engine and execute the rules' RHSs. This is equal to a single
thread fetching tasks from a work queue and executing them sequentially.
If you want to actually process requests in parallel then you'll need an engine pool.
Otherwise, you'd need to explicitly structure your rules in a way that leverages the
inherent parallelism.
> 2. what is the best way to pass an HttpServletRequest into Jess?
You were talking about a business logic servlet. Why does it need to know anything
about HTTP requests? I'd rather hide that in some interface that translates the
requests in a form most suitable for processing by business rules.
> 3. how do I clean up after processing a request (so I don't accumulate a
> large number of obsolete request facts)?
You can usually retract request and control facts right after you've "used" them. You
can also proceed in a sequence of phases, the last one being the "cleanup phase".
Somebody posted a set of rules to the list, that provide a framework for phase control.
> 4. is this a good idea at all?
I'd say it's a very good idea. I did a similar thing for systems integration. You
should work towards a clear-cut separation between business logic and the more
technical stuff.
Greetings, Thomas
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------