Discussion:
[omniORB] Is there any way for the corba server to be aware of the death of a client?
Li, Jun Jie
2009-01-09 16:44:26 UTC
Permalink
Hi Guys

We have a client-server application implemented on OminiORB. The server will keep some resource for each client
Normally, if the client exits gracefully, we can use deRegister to inform the server to release the resource for this client.
But if any client is killed or aborted, Is there any way for the server to be aware of its death?
One way might be the server monitor the clients idle time and release it if time is out, I'm wondering if there is any native way at OminiORB level to inform the server if this happens?

Thanks
Junjie
Martin Trappel
2009-01-09 20:57:52 UTC
Permalink
Post by Li, Jun Jie
Hi Guys
We have a client-server application implemented on OminiORB. The server will keep some resource for each client
Normally, if the client exits gracefully, we can use deRegister to inform the server to release the resource for this client.
But if any client is killed or aborted, Is there any way for the server to be aware of its death?
One way might be the server monitor the clients idle time and release it if time is out, I'm wondering if there is any native way at OminiORB level to inform the server if this happens?
CORBA in general does not provide for such a mechanism. Generally your
client *could* be dead (not running) for a while and the come back alive
without the server noticing.
Also, as CORBA does not require a network connection to be available
while the client does not call the server, there is no way for any ORB
to monitor its clients via that way.

The two easiest alternatives are imho:
a) Having a client idle timeout in the server as you propose
b) Having the client (additionally) provide a callback function for the
server to determine if it's alive/reachable. (However, if there are no
other callbacks, this first additional callback might discover
connection problems *from* the server *to* the client, so having the
server provide a ClientAlive(client_id) function for the clients to
reset the idle timeout may be a better solution if you have no other
callbacks.)

br,
Martin

Loading...