Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Solaris Cluster Data Services Developer's Guide Oracle Solaris Cluster 4.0 |
1. Overview of Resource Management
Oracle Solaris Cluster Application Environment
Description of a Resource Type
Description of a Resource Group
Resource Group Manager Administrative Interface
3. Resource Management API Reference
6. Data Service Development Library
8. Sample DSDL Resource Type Implementation
9. Oracle Solaris Cluster Agent Builder
12. Cluster Reconfiguration Notification Protocol
A. Sample Data Service Code Listings
B. DSDL Sample Resource Type Code Listings
C. Requirements for Non-Cluster-Aware Applications
D. Document Type Definitions for the CRNP
For writing data service code, the resource management architecture provides a low-level or base API, a higher-level library that is built on top of the base API, and Oracle Solaris Cluster Agent Builder, a tool that automatically generates a data service from basic input that you provide.
The Resource Management API (RMAPI) provides a set of low-level functions that enable a data service to access information about the resource types, resources, and resource groups in the system, to request a local restart or failover, and to set the resource status. You access these functions through the libscha.so library. The RMAPI provides these callback methods both in the form of shell commands and in the form of C functions. See the scha_calls(3HA) man page and Chapter 3, Resource Management API Reference for more information about the RMAPI functions. Also see Chapter 5, Sample Data Service for examples of how to use these functions in sample data service callback methods.
Built on top of the RMAPI is the Data Service Development Library (DSDL), which provides a higher-level integrated framework while retaining the underlying method-callback model of the RGM. The libdsdev.so library contains the DSDL functions.
The DSDL brings together various facilities for data service development, including the following:
libscha.so. The low-level resource management APIs.
PMF. The Process Monitor Facility (PMF), which provides a means of monitoring processes and their descendants, and restarting them if they die. See the pmfadm(1M) and rpc.pmfd(1M) man pages.
/usr/cluster/bin/hatimerun. A facility for running programs under a timeout. See the hatimerun(1M) man page.
For the majority of applications, the DSDL provides most or all of the functionality you need to build a data service. Note, however, that the DSDL does not replace the low-level API but encapsulates and extends it. In fact, many DSDL functions call the libscha.so functions. Likewise, you can directly call libscha.so functions while using the DSDL to code the bulk of your data service.
See Chapter 6, Data Service Development Library and the scha_calls(3HA) man page for more information about the DSDL.
Agent Builder is a tool that automates the creation of a data service. You input basic information about the target application and the data service to be created. Agent Builder generates a data service, which includes GDS driver scripts or source and executable code (C or Korn shell) with a customized RTR file and an Oracle Solaris SVR4 package.
For most applications, you can use Agent Builder to generate a complete data service with only minor manual changes on your part. Applications with more sophisticated requirements, such as adding validation checks for additional properties, might require work that Agent Builder cannot do. However, even in these cases, you might be able to use Agent Builder to generate the bulk of the code and manually code the rest. At a minimum, you can use Agent Builder to generate the Oracle Solaris package for you.