Availability Guide for Application Design
Availability Through Process-Pairs and Monitors
Availability Guide for Application Design—525637-004
7-20
Language Issues
A further complication in the passive-backup model involving multithreaded design is
the fact that checkpoints are always waited operations. Every time a thread issues a
procedure call to checkpoint some information, the entire process suspends until the
checkpoint operation finishes. As more threads are added, the amount of time the
process spends waiting for checkpoint operations to finish increases.
The active backup model allows you to copy information to the backup process using
nowait operations. The active model uses interprocess messages implemented by
simple read/write operations of the file system, which can execute nowait and do not
suspend the entire process. Note that the active model may still have to complete all
pending checkpoint messages to reach a synchronized state — for example, to avoid
violating a synchronization depth window on a file.
Multithreaded processes can easily become very inefficient, regardless of the backup
model used. You must carefully plan your checkpointing algorithms to minimize the
number of checkpoints and the amount of data that is being checkpointed.
Language Issues
For a process pair (with an active backup or a passive backup) to be a workable
solution, you need the following:
•
A clearly defined set of data that defines the essential execution state of the
process.
•
Access to the NonStop programming options in the Guardian application
programming interface. These options include the checkpointing procedures,
procedures for opening a file in the backup, and procedure options for setting the
sync depth for a file.
These conditions place restrictions on the use of many high-level programming
languages, because many of them “hide” parts of the execution environment and few
offer the required degree of access to the Guardian NonStop primitives.
The following paragraphs discuss the appropriateness of some of the more common
programming languages for writing NonStop process pairs on NonStop systems:
•
pTAL and TAL
•
C and C++
•
Native mode COBOL and COBOL85
•
FORTRAN
•
NonStop Server for Java
pTAL and TAL
TAL has historically been HP’s systems programming language and imposes no
restrictions on NonStop code whether for active backup or passive backup. The pTAL
language continues this support and increases portability of code by removing
processor-dependent features. New applications that cannot be written in C or C++