Hello,
In Jess in Action, I found the following advice in the description of
the Catalog servlet:
"For efficiency, all customers will share a single Rete object (you can
keep their data separate by using distinct order numbers). You want the
Rete object to be initialized when the web application is first started,
and you want it to persist as long as the web server is running." (p
337)
Does this not create a problem with response time? I am assuming that
one instance's rete.run() would block on the other ones to finish. It
does not seem that this would work in a high-volume (3 hits/sec) web
application. Is there anything wrong with the implementation choice of
having a pool of Rete objects to use, with one object active per user?
Each object would store only one user's data, and be reset between
sessions. Are there any hidden pitfalls with this approach, from a Jess
point of view?
On a related note, is it possible to deep clone a Rete object? That is,
instead of loading all the rules in every Rete object, maintain a clean
instance and clone it?
Thank you,
Andrei Boutyline