Re: How to deal with References that point to "dead" servants
- From: GrahamJWalsh@xxxxxxxxx
- Date: 20 Dec 2005 02:55:19 -0800
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
.
- Follow-Ups:
- Re: How to deal with References that point to "dead" servants
- From: Markus Elfring
- Re: How to deal with References that point to "dead" servants
- References:
- How to deal with References that point to "dead" servants
- From: maxpower24
- How to deal with References that point to "dead" servants
- Prev by Date: Re: Exception as Parameter
- Next by Date: Re: Exception as Parameter
- Previous by thread: How to deal with References that point to "dead" servants
- Next by thread: Re: How to deal with References that point to "dead" servants
- Index(es):
Relevant Pages
|