Availability Guide for Application Design
Availability Through Process-Pairs and Monitors
Availability Guide for Application Design—525637-004
7-12
Active Backup Model
7. The file system updates the application’s synchronization identifier. The disk
process and application are once again synchronized.
If the primary application process fails before its next checkpoint, the backup process
takes over and reissues the write request. The disk process accepts the request only if
the synchronization identifiers match. In other words, if the synchronization identifiers
are different, then we know that the write already took place. The disk process replies
to the application (with a saved copy of the original response, to maintain integrity),
and the file system brings the synchronization identifiers back into synchronization.
Disk files are limited to a nowait depth of one so that operations will always finish in the
order in which they are issued.
Active Backup Model
This subsection discusses how a process pair with an active backup process
implements the general process-pair model discussed under How Do Process Pairs
Work? on page 7-4.
The active backup model is the generalized model in that it is freed from the
restrictions imposed by the system procedures that provide the checkpointing and
monitoring capabilities. This flexibility, however, is obtained by writing application code
to perform the types of operations done for you in the passive backup model.
The following discussion assumes that you use the HP NonStop C language. Active
backup process pairs can also be written in TAL; Active Backup With TAL on page 7-16
lists the equivalent procedures. For more details on programming-language issues and
process pairs, refer to Language Issues on page 7-20.
Specifically, this subsection discusses the following aspects of the active backup
model:
•
Starting and opening the backup process.
•
Using interprocess communication to send process-state information to the backup
process. Such state information includes file-open information, critical data, file-
state information, and flow-control information.
•
Receiving and processing information in the backup process, including opening
$RECEIVE to read incoming messages, receiving state information from the
primary, opening files in the backup, processing control-state information, and
receiving operating system messages indicating whether the primary process has
failed.
•
Taking over of the primary role by the backup process.
Starting the Active Backup
The primary process creates the backup process using the __ns_start_backup()
function. The backup process is created from the same source file as the primary
process and with the same initialization state. The standard input, standard output, and