Spooler Programmer's Guide
Using the Spooler Interface Procedures
Spooler Programmer’s Guide—522287-002
2-17
Spooling From a NonStop Process Pair
Spooling From a NonStop Process Pair
An application process sending data to a collector can run as a NonStop process pair.
Programmers writing such applications should be aware of the checkpointing
considerations described in this subsection.
This discussion assumes that you already have knowledge of fault-tolerant
programming (coding NonStop process pairs).
For an application program to run as a NonStop process pair, the system spooler
should also be running as a NonStop process pair. Otherwise, an attempt at NonStop
spooling from the application will not be fully effective.
If the collector is running as a NonStop process pair, you can spool with or without the
spooler interface procedures. However, the considerations are different in each case.
You must decide whether or not the application can tolerate duplication of a line of data
in the event of a failure of the application’s primary process. If the application cannot
tolerate duplication of any lines, then sync depth must be specified when the collector
is opened.
Use of Sync Depth
When a NonStop process pair opens the collector, it can set the sync-depth parameter
of the file-system OPEN or FILE_OPEN_ procedure to a value of 1 or more, up to 15.
Each write to the collector is then tagged by the file system with a sync ID. This
ensures that, in the event of a failure of the primary processor, the collector will
recognize any line rewritten by the backup.
If you have opened the collector with a nonzero sync depth, the information
checkpointed should include the synchronization block of the file to the collector. A
sync depth greater than 1 allows the application to perform less-frequent checkpoints.
If you open the file to the collector with a sync depth of n, the application need only
checkpoint before every nth write operation.
Spooling—Levels 1 and 2
The considerations for spooling on levels 1 and 2 from a NonStop process pair are
very similar. Your main concern while performing such spooling from an application
program is whether you can afford duplication in your spooled job.
Spooling With a Zero Sync Depth
If duplication of data lines can be tolerated, then a reasonable checkpointing strategy is
to checkpoint the primary processor stack, the line of data to be spooled, and the
Note. The examples in this subsection deal with checkpointing only to ensure the integrity of
the application-collector interface. Checkpointing the remainder of the program is left to the
programmer.