Revision 4 as of 2014-01-07 17:27:50

Clear message

Object Methods

Synchronous, asynchronous and transactional programming

Most APIs will be synchronous. APIs that would block for significant time should be (such as those that send a message and wait for a reply) offered as both synchronous and asynchronous flavors. This shall be implemented as follows:

Example:

Version HelloExchange(int node, Version myVersion, Wakeable& wake); // Returns other node's version, raises exception on error

Application code can call this function in the following ways:

   1 HelloExchange(1,"1.0.0");

   1 ThreadSemaphore sem;
   2 HelloExchange(1,"1.0.0",sem);
   3 sem.take();  // Blocks until hello exchange "gives" the semaphore
   4 







Configuration

All SAFplus components manage their configuration via the SAFplus::Mgt objects and backing database. SAFplus will convert XML configuration files from and to the database (automatically on startup if the DB does not exist) so no direct use of XML is necessary.

Statistics

Statistics are reported through the same SAFplus::Mgt objects (but statistics are not stored to the Database)

Fault

If a component takes a fault, it may assert. If a component detects a fault, timeout or other error in another component, it must report that error to the Fault Manager component and then retry. It may not assume that the other component is faulted, failed or dead until it receives a notification from the Fault Manager announcing the component's failure.

The Fault Manager is authoritative:

If a component is working fine and receives an announcement reporting its own failure, it must quit. If a component thinks that another component is working but receives a fault manager notification of its death, it must behave as though the component has failed.