Generic Data Services
This chapter provides information on the generic data service (GDS) and shows you how to create a service that uses the GDS using either the SunPlex Agent Builder or the standard Sun Cluster administration commands.
Using the SunPlex Agent Builder to Create a Service Using GDS
Using the Standard Sun Cluster Administration Commands to Create a Service Using GDS
Overview of GDS
The GDS is a mechanism for making simple network-aware applications highly available or scalable by plugging them into the Sun Cluster Resource Group Management framework. This mechanism does not require the coding of an agent which is the typical approach for making an application highly available or scalable.
The GDS is a single, precompiled data service. You cannot modify the precompiled data service and its components, the callback method (rt_callbacks(1HA)) implementations and the resource type registration file (rt_reg(4)).
Precompiled Resource Type
The generic data service resource type SUNW.gds is included in the SUNWscgds package. The scinstall(1M) utility installs this package during cluster installation. The SUNWscgds package includes the following files:
# pkgchk -v SUNWscgds /opt/SUNWscgds /opt/SUNWscgds/bin /opt/SUNWscgds/bin/gds_monitor_check /opt/SUNWscgds/bin/gds_monitor_start /opt/SUNWscgds/bin/gds_monitor_stop /opt/SUNWscgds/bin/gds_probe /opt/SUNWscgds/bin/gds_svc_start /opt/SUNWscgds/bin/gds_svc_stop /opt/SUNWscgds/bin/gds_update /opt/SUNWscgds/bin/gds_validate /opt/SUNWscgds/etc /opt/SUNWscgds/etc/SUNW.gds |
Why Use GDS
The GDS has the following advantages over using either the SunPlex Agent Builder generated source code model (see scdscreate(1HA)) or the standard Sun Cluster administration commands:
The GDS is easy to use.
The GDS and its methods are precompiled and are therefore not modifiable.
The SunPlex Agent Builder can be used to generate driving scripts for your application and these scripts are packaged in a Solaris-installable package that can be reused across multiple clusters.
Ways to Create a Service That Uses GDS
There are two ways to create a service that uses the GDS:
Using the SunPlex Agent Builder
Using the standard Sun Cluster administration commands
GDS and the SunPlex Agent Builder
Use the SunPlex Agent Builder and select GDS as the type of generated source code. The user input is used to generate a set of driving scripts that configure resources for the given application.
GDS and the Standard Sun Cluster Administration Commands
This method uses the precompiled data service code in SUNWscgds but requires that the system administrator use the standard Sun Cluster administration commands (scrgadm(1M) and scswitch(1M)) to create and configure the resource.
Selecting the Method to Use to Create a GDS-Based Service
As shown in the procedures How to Use Sun Cluster Administration Commands to Create a Highly Available Service Using GDS and Standard Sun Cluster Administration Commands to Create a Scalable Service Using GDS, a significant amount of typing is required to issue the appropriate scrgadm and scswitch commands.
Using the GDS with SunPlex Agent Builder simplifies the process because it generates the driving scripts that issue the scrgadm and scswitch commands for you.
When Is GDS Not Appropriate
While using the GDS has many advantages, there are instances when it is not appropriate to use the GDS. The GDS is not appropriate:
When more control is required than is available using the precompiled resource type. such as when you need to add extension properties or change the defaults.
When the source code needs to be modified to add special functions.
When you want to use multiple process trees.
When you want to use non-network-aware applications.
Required Properties for GDS
The following properties must be provided:
Start_command (extension property)
Port_list
Start_command Extension Property
The start command, which you specify in the Start_command extension property, launches the application. It must be a UNIX command complete with its arguments that can be passed directly to a shell to start the application.
Port_list Property
The Port_list property identifies the list of ports that the application listens on. The Port_list property must be specified on the start script created by the SunPlex Agent Builder or on the scrgadm command if you are using the standard Sun Cluster administration commands.



