Problem:
- Product Name: VisiBroker
- Product Version: Any
- Platform/OS Version: All supported platforms
How does the OSAgent client management work?
Resolution:
Every CORBA application connected to OSAgent is regarded as an OSAgent client. This client role is independent of the process role as a CORBA client, server or mid-tier. All these clients are actively managed by OSAgent.
Login:
When an ORB is started, it will locate an OSAgent instance and login, provided that OSAgent connectivity is not disabled via vbroker.orb.enableLocator=false.
In the OSAgent logs each login of a new client is tracked by the message “newClient() Detected a new client at”
Client Heartbeat:
Every ORB sends a heartbeat signal to his OSAgent in regular intervals. The default is a 2 minutes interval, set by vbroker.agent.keepAliveTimer on the ORB side. The OSAgent sends a confirmation for each heartbeat.
Client Reconnect:
An ORB can detect disconnection from OSAgent in two ways. If the OSAgent is orderly shutdown it will send a close request to each registered client, informing him that the OSAgent will no longer be available. If the connection to OSAgent is unexpectedly lost, for example by killing the OSAgent process or due to a network issue, the missing answer to the Client Heartbeat is a signal to the ORB that the connection was lost. The client will then broadcast within his subnet to locate an OSAgent and reconnect to it.
Client Verification:
OSAgent performs regular checks on the availability of the registered clients. The interval is set by vbroker.agent.keepAliveTimer on the OSAgent side.
In each interval OSAgent will verify the existence of up to 50 clients in order to limit the CPU and network load. The clients are organized in a list. If the list contains more than 50 clients the start index for verification increases on each interval by 50 until the end of the list is reached. Then the verification will restart from the first index.
All details are printed to the OSAgent log:
timerExpired() numOfClients=2 ...verifying existence from 0 onwards (for upto Maximum of 50 clients)
The message indicates that currently 2 clients are registered and verification starts from index 0.
If the last heartbeat from a client is longer than ( vbroker.agent.keepAliveTimer vbroker.agent.keepAliveThreshold ) ago, OSAgent will verify the client existence. OSAgent will retry to reach the client vbroker.agent.maxRetries times. If the client does not answer, OSAgent will regard the client as unavailable and remove him from the client list. It is logged by the message “removeClient() Removing client at” in the OSAgent logs.
If the client was a CORBA server with objects registered at OSAgent, the object references will be removed. This is logged by the message “lostProvider() The following service is no longer available” in the OSAgent logs.
#Security
#VisiBroker