
Event Monitoring Service Developer’s Kit
Programming Tips
Programming Tips
How do I prevent initial monitoring requests from timing out?
Using rm_monitor_start and rm_get_next_event
EMS monitors are launched in response to client requests. A client request cannot be accepted by a monitor until two specific EMS API calls are made. These two calls are rm_monitor_start() and rm_get_next_event().
•rm_monitor_start() is the first call made to the EMS API by a monitor. It is called to register the process as a resource monitor, and to establish a communication path between the EMS API and the Registrar.
•rm_get_next_event() should be called next by the monitor so that the monitor is ready to receive requests. It is through this call that the client requests are passed to a monitor.
Typically, the monitor will block at the rm_get_next_event() until an incoming message from the EMS API has been received. If the monitor does not call rm_get_next_event() quickly enough, client applications may timeout before a client’s request completes.
Figure 1-1 outlines the typical request process.
Frequently Asked Questions | 3 |