Availability Guide for Application Design
Availability Through Process-Pairs and Monitors
Availability Guide for Application Design—525637-004
7-16
Active Backup With TAL
To take over as the primary process, the backup process must call the
PROCESS_SETINFO_ Guardian procedure and specify that it is to become the
primary process. Having done so, it can continue processing from the logical point
indicated in the control-flow information received from the primary process. Processing
continues using the current data state of the backup process. That data state depends
on the critical data and file-status information updated in the backup using information
provided in interprocess messages sent by the primary process.
If write operations are reissued in the new primary process, the file system and disk
process use synchronization identifier values to determine whether the request should
be processed. The application’s synchronization identifier is copied from the primary
process to the backup process as part of the file-status information. Otherwise, the
mechanism is the same as that used by the passive-backup technique. Refer to
Takeover by the Passive Backup on page 7-10.
The new primary process must continue processing the application and, at an
appropriate time, start a new backup process.
Active Backup With TAL
While HP expects most active backup process pairs to be written using the HP
NonStop C programming language, the alternate languages for doing this are pTAL
and TAL. Table 7-1 lists the Guardian procedures that you would call from a TAL
program to perform the equivalent of the corresponding NonStop C function.
Table 7-1. TAL Procedure and NonStop C Function Correspondence
The operation...
Performed in NonStop C by the
function...
Can be done in pTAL
or TAL using the
procedure...
Opening a file in
the backup
__ns_backup_fopen() FILE_OPEN_
Getting the file-
open status
__ns_fget_file_open_state() not needed
Getting the current
file status
__ns_fget_file_state() GETSYNCINFO
Setting the file
status in the
backup
__ns_fset_file_state() SETSYNCINFO
Opening a file with
a sync depth
greater than one
__ns_open_special() FILE_OPEN_
Starting and
initializing the
backup process
__ns_start_backup() PROCESS_LAUNCH_