Sun Microsystems
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next
Chapter 1

The Foundation Services CMM API

The CMM API can be used to develop programs for highly available clusters running the Foundation Services. For more information, see the following topics:

Overview

The CMM API provides a programming interface to the Cluster Membership Manager (CMM). For information about the CMM, see the Netra High Availability Suite Foundation Services 2.1 6/03 Overview.

The CMM API enables you to write applications that manage peer nodes in the cluster and that monitor the role, qualification level, and state of these peer nodes. You can use the CMM API to obtain information about which node is the master node, the vice-master node, and a member of the cluster.

The CMM API also provides functions that modify the state of a cluster and enable a node to receive information about changes in the state of a cluster.

This interaction of the CMM API with the Foundation Services is illustrated in Figure 1-1.

Figure 1-1 Interaction of the CMM With Your Applications Using the CMM API

Flow diagram shows applications requesting node information from the CMM. Flow diagram also shows applications receiving notifications from the CMM.

Characteristics of the CMM API

The CMM API enables you to create highly available applications to determine which nodes are in the cluster, and which of these nodes is the master node and the vice-master node. The main functions of the CMM API are to:

  • Manage the membership of peer nodes

  • Determine the availability of peer nodes

  • Provide a failover framework for critical applications

  • Gather information about some or all peer nodes

The CMM API has the following multithreading characteristics:

  • It is multithread safe: mutual exclusion among threads is guaranteed when critical sections of the API are executed

  • It is deferred-thread cancellation safe: All API functions are cancellation points.

  • It is not asynchronous-thread cancellation safe.

  • The CMM API calls cannot be interrupted by signals: If a signal is caught during a call, the call runs to completion. The call is not aborted and does not return an error in this case.

  • It is not signal-handler safe: applications must not make calls to the API from signal handlers.

  • It is not fork1 safe: Applications must not make calls to the API from fork handlers.

Examples of the CMM API are provided in the SUNWnhcmd package. These examples are available after installation on a peer node, in the /opt/SUNWcgha/examples/cmm_API directory. For more information, see CMM API Code Examples.

The CMM API header file, cmm.h, is located in the /opt/SUNWcgha/include directory.

The default location of the CMM API library files in the /opt/SUNWcgha/lib directory.

To access the CMM API header file and libraries, the SUNWnhcmd package must be installed in your development environment. See Chapter 3, Setting up the Development Environment and Chapter 4, Building CMM Applications for information about creating a development environment for the Foundation Services product.

Previous Previous     Contents     Index     Next Next