Re: How to deal with References that point to "dead" servants



Hi Max,

Assuming timeouts are not possible, the approach I mention below might
well work for you. If you have timeouts available, then on the client
side you could simply reduce it to 100ms, say. If no response it
received within that time interval the client can catch the exception
and take the appropriate action.

If timeouts are not an option to you....

others will have different views on this but your problem is not new.
Essentially, you need to ensure the integrity of the objects bound to
the Name Service. ie. you need some means of checking the status of
each object and unbinding it if needs be. Ideally, you'd like to be
able to unregister your objects upon deletion. i.e. in the dtor for
your servants you can put code in there to unregister them. That deals
with normal operation.

However you're more concerned with un-graceful servant
crash...whatever. In that case you're getting no dtor code being called
and stale/bad refs are knocking around the NS. You could avail of
callbacks to achieve the desired effect. I mean you could have a method
in your servants which "call back" on an object every N seconds. This
is effectively pinging and all the baggage that comes with it. n/w
traffic etc. It's an option to you all the same.

Another approach would be for you to have some sort of monitor process.
This process iterates over the entries in the name service every N
seconds and issues some sort of "ping" method on the object in
question. When the ping method receives no response or throws an
exception, your client can dedude the object is no longer valid and
needs to be removed/unbound from NS. This wil reduce.. but not
erradicate, the possibilty of your clients getting bogus references
from the Name Service.

Both of these involve code. there's no corba silver bullet here that
addreses your problem. One of these solutions might be feasible to you.
Alternatively you could take the advice of ciaran mc hale who will
probably blow holes in my posting :) ha ha.


Aside: I wonder if the latest version of the CORBA spec addresses this
in any shape of form. It's an old problem.

Cheers

Graham

.



Relevant Pages

  • Re: Should COBOL be lockedUP for good?...
    ... Windows had demonstrated that if a client ... I don't think that 'Timeouts' are sensible. ... why I would want to lock a record for some hours, ...
    (comp.lang.cobol)
  • Re: IMAP timeouts
    ... >> have changed either on server side or client side. ... I applied the latest windows security updates with the ... your Windowshost after the update causing the timeouts. ...
    (Fedora)
  • Re: how timeout recommendations from rfc2821 apply when pipelining rfc2920
    ... If the smtp client is using RFC timeouts, ... since the server could be pipelining the response back, ... Should the smtp server break apart a pipeline message on timeout ...
    (comp.mail.sendmail)
  • Re: System.WebException | The operation has timed out
    ... Setting KeepAlive to false did not help resolve any of the timeouts? ... When your client is making a HttpWebRequest to the server. ... But the error I am receiving is ... >> webserver to keep a persistent connection open. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Not deactivated servants
    ... are not deactivated before that client process exits. ... server keeps on sending messages using those servants created by client A. ...
    (comp.object.corba)