1. Overview of Resource Management
Analyzing the Application for Suitability
Setting Up the Development Environment for Writing a Data Service
How to Set Up the Development Environment
Transferring a Data Service to a Cluster
Setting Resource and Resource Type Properties
Declaring Resource Type Properties
Declaring Resource Type Properties for a Zone Cluster
Declaring Extension Properties
Accessing Resource and Resource Group Property Information
How Methods Are Invoked in Zones
Starting and Stopping a Resource
Deciding Which Start and Stop Methods to Use
Using the Optional Init, Fini, and Boot Methods
Guidelines for Implementing a Fini Method
Implementing Monitors and Methods That Execute Exclusively in the Global Zone
Adding Message Logging to a Resource
Providing Administrative Support for a Resource
Implementing a Failover Resource
Implementing a Scalable Resource
Validation Checks for Scalable Services
Writing and Testing Data Services
Using TCP Keep-Alives to Protect the Server
Coordinating Dependencies Between Resources
3. Resource Management API Reference
6. Data Service Development Library
8. Sample DSDL Resource Type Implementation
9. Solaris Cluster Agent Builder
12. Cluster Reconfiguration Notification Protocol
B. Sample Data Service Code Listings
C. DSDL Sample Resource Type Code Listings
E. Requirements for Non-Cluster Aware Applications
F. Document Type Definitions for the CRNP
The Solaris Cluster developer support package (SUNWscdev) provides two sets of interfaces for coding data service methods:
The Resource Management API (RMAPI), a set of low-level functions (in the libscha.so library)
The Data Services Development Library (DSDL), a set of higher-level functions (in the libdsdev.so library) that encapsulate the functionality of the RMAPI and provide some additional functionality
Also included in the Solaris Cluster developer support package is Solaris Cluster Agent Builder, a tool that automates the creation of a data service.
Here is the recommended approach to developing a data service:
Decide whether to code in C or the Korn shell. If you decide to use the Korn shell, you cannot use the DSDL, which provides a C interface only.
Run Agent Builder, specify the requested information, and generate a data service, which includes source and executable code, an RTR file, and a package.
If the generated data service requires customizing, you can add DSDL code to the generated source files. Agent Builder indicates, with comments, specific places in the source files where you can add your own code.
If the code requires further customizing to support the target application, you can add RMAPI functions to the existing source code.
In practice, you can take numerous approaches to creating a data service. For example, rather than add your own code to specific places in the code that is generated by Agent Builder, you could entirely replace one of the generated methods or the generated monitor program with a program that you write from scratch using DSDL or RMAPI functions.
However, regardless of how you proceed, in almost every case, starting with Agent Builder makes sense, for the following reasons:
The code that is generated by Agent Builder, while generic in nature, has been tested in numerous data services.
Agent Builder generates an RTR file, a makefile, a package for the resource, and other support files for the data service. Even if you use none of the data service code, using these other files can save you considerable work.
You can modify the generated code.
Note - Unlike the RMAPI, which provides a set of C functions and a set of commands for use in scripts, the DSDL provides a C function interface only. Therefore, if you specify Korn shell (ksh) output in Agent Builder, the generated source code makes calls to RMAPI because there are no DSDL ksh commands.