Availability Guide for Application Design

Availability Through Process-Pairs and Monitors
Availability Guide for Application Design525637-004
7-13
Sending Process-State Information to the Active
Backup
standard error files are created with the same file-state information as in the primary
process.
Once the backup process is created, the primary process can open it and begin
sending data-state and control-state messages to it using interprocess communication.
Like the passive backup model, the primary process needs to create and open the
backup process in the following situations:
On initial program startup.
Following takeover when the new primary process needs to create a new backup
process.
On failure of the backup process.
Sending Process-State Information to the Active Backup
The primary process uses interprocess communication to send process state
information to the backup process. Refer to the Guardian Programmer’s Guide for
details on using the WRITE or WRITEX and WRITEREAD or WRITEREADX
procedures to write messages using interprocess communication.
Examples of the kinds of process state information that the primary process might
need to send to the backup process include:
File-open-state information
Critical data
File-state information
Control-state information
File-Open-State Information
For all files for which it is important that requests from the backup process be
associated with requests from the primary process, the backup process must have a
record of the status of the file open in the primary process in case it needs to take over
processing.
NonStop C provides the __ns_fget_file_open_state() function specifically for
obtaining the state of a file open. This function returns a data structure that you can
send to the backup process using regular Guardian interprocess communication.
Critical Data
Critical data is application dependent. It is up to the designer to decide what data is
necessary to enable the backup process to continue operation without interruption.
You can make various tradeoffs when determining what data to send to the backup
process. For example, suppose some item of data can be either sent to the backup
process from the primary process or recomputed by the backup process on takeover. If
the primary process sends the information to the backup process, then the