You keep describing an architecture in which a single Rete object
services multiple clients. Most of our correspondence has concerned
your trying to figure out how the clients can decide when the Rete
object is "quiet" so they can have a turn with it.
What I keep saying is that it's unnecessary for the clients to wait
until the Rete object is "quiet." A single Rete object can service
many clients simultaneously, as long as the facts associated with each
client process are distinguishable. If we're talking about an
e-commerce system, then facts like this won't work:
(customer-order milk bread apples)
(credit-card-number 2222-1111-4443-2222)
But facts like these are perfect
(customer-order (cust-id 1232142) (items milk break apples))
(credit-card-number (cust-id 1232142) (card 2222-1111-4443-2222))
Now many separate orders can be in the Rete network at the same
time. The facts pertaining to available items, sale prices, etc.,
don't need customer IDs, of course, and are thus shared.
The Rete object can therefore run continuously. When it's reached some
conclusion, it communicates it to the outside, probably by calling a
Java method. That method would store the arguments someplace and then
call notify(), to wake up a client thread to let it know the result is
ready. It might never become quiet -- it's working all the time.
I think chinnaswamy gounder wrote:
> Hi ernest,
>
> Greetings.
>
> Providing a slot for user-ID in what way it will help.
> Fact has a header, slot parameters and their values.
> If user-ID is one such slot, we are just providing one
> extra parameter and its value. Any thing more.
>
> Advance thanks for your advice
>
> Chinnaswamy
>
> --- [EMAIL PROTECTED] wrote:
> >
> > runUntilHalt will run the engine until you call
> > (halt) -- i.e., it can
> > run forever, If there are no rules to fire, it
> > sleeps.
> >
> > Many concurrent users can share a single Rete
> > object. The Rete object
> > can be running in one thread, and communication can
> > happen from other
> > threads. You can assert facts from many different
> > threads while the
> > engine is running, and if results are returned by
> > calling Java
> > methods, these methods can use notify() to contact
> > the client threads
> > to retrieve the results.
> >
> > The only complication is that the facts pertaining
> > to each client have
> > to be distinct. Using a client-id (coookie) slot in
> > the user-specific
> > facts would be sufficient.
> >
> > You might want to get a book on multithreaded
> > application design. Doug
> > Lea's Concurrent Programming in Java is very good.
> >
> >
> > I think chinnaswamy gounder wrote:
> > > Hi All,
> > > In my web applications ( with hundreds of
> > > concurrent users ), after creating a Rete object
> > and
> > > referring the related rules, if I say
> > >
> > > " runUntilHalt();
> > >
> > > will this rete object continue to run until the
> > end of
> > > the session.
> > >
> > > It means that with a single Rete object
> > only
> > > after the end of every session , the next user
> > will be
> > > able to use the Rete object. Is creating a pool of
> > > Rete objects the only way to apply rule engine in
> > web
> > > applications of having hundreds of concurrent
> > users.
> > >
> > >
> > > Seeking your advice on this
> > >
> > > Chinnaswamy
> > > Singapore
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Get email at your own domain with Yahoo! Mail.
> > > http://personal.mail.yahoo.com/
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > 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]
> > >
> >
> ---------------------------------------------------------------------
> > >
> >
> >
> >
> >
> ---------------------------------------------------------
> > 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]
> >
> ---------------------------------------------------------------------
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> ---------------------------------------------------------------------
> 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]
> ---------------------------------------------------------------------
>
---------------------------------------------------------
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]
---------------------------------------------------------------------