Re: Serious Bonobo Problem for Sun



Colm Smyth <Colm Smyth Sun COM> writes:

>    client; this mechanism requires each object server to maintain a
>    timeout value and a last-invoked time for each of it's clients; this
>    could be done globally or for each object instance in an object server 

Does the server have to maintain anything but a time-to-die timer?
When the server is created, the timer is set to some suitable value,
and the lease renewal code could look something like:

void Server::renew (unsigned int n_secs)
{
    time_to_die = MAX (time_to_die, n_secs);
}

This should guarantee that the server never dies within the time frame
that a client has requested it stays alive.  When the timer expires,
the server can safely commit suicide.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]