Oracle® Solaris Cluster Data Services Developer's Guide

Exit Print View

Updated: July 2014, E39646-01
 
 

How the Server Delivers Events to a Client

As events are generated within the cluster, the CRNP server delivers them to each client that requested events of those types. The delivery consists of sending an SC_EVENT message to the client's callback address. The delivery of each event occurs on a new TCP connection.

Immediately after a client registers for an event type, through an SC_CALLBACK_REG message that contains an ADD_CLIENT message or an ADD_EVENT message, the server sends the most recent event of that type to the client. The client can determine the current state of the system from which the subsequent events come.

When the server initiates a TCP connection to the client, the server sends exactly one SC_EVENT message on the connection. The server issues a full-duplex close.

    For example, the client carries out the following actions:

  1. Waits for the server to initiate a TCP connection

  2. Accepts the incoming connection from the server

  3. Waits for an SC_EVENT message from the server

  4. Reads an SC_EVENT message from the server

  5. Receives an indicator that the server has closed the connection (reads 0 bytes from the socket)

  6. Closes the connection

When all clients have registered, they must listen at their callback address (the IP address and port number) at all times for an incoming event delivery connection.

If the server fails to contact the client to deliver an event, the server tries again to deliver the event the number of times and at the interval that you define. If all attempts fail, the client is removed from the server's list of clients. The client also needs to reregister by sending another SC_CALLBACK_REG message that contains an ADD_CLIENT message before the client can receive more events.