Absolutely, this is possible. In fact, there are two different ways to do it.
On a machine with multiple processors, the high-performance way to do this is to have a separate jess.Rete object for each client. Each jess.Rete object could run in a separate Thread. The downside of this is, of course, that there's a lot of data-structure duplication, and so this is going to use a lot of memory. To optimize for space, or on a single-processor machine, the best thing to do is to use a single jess.Rete object, and put a slot into each of your deftemplates for a client ID number. That way a single Rete object could simultaneously service thousands of clients; the line of reasoning for each client would be independent, since the facts pertaining to each client are distinguishable. Don't use ordered facts. Nobody should ever use ordered facts, anyway. I think Rajaram Subramanian wrote: > Hi, > Is it possible to have a single instance of the rule engine Rete take care > of multiple clients? Can we maintain separate lists of facts > asserted/retracted for each client inside the expert system that do not > get mixed up? > Let us say that fact1 was asserted for client1, but when client2 runs > fact1 is retracted(for itself only). But fact1 should still be asserted > for client1. Is this possible? > Regards, > Raj. > --------------------------------------------------------- Ernest Friedman-Hill Distributed Systems Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 Org. 8920, MS 9012 [EMAIL PROTECTED] PO Box 969 http://herzberg.ca.sandia.gov Livermore, CA 94550 --------------------------------------------------------------------- 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] ---------------------------------------------------------------------
