Availability Guide for Application Design
Availability Through Process-Pairs and Monitors
Availability Guide for Application Design—525637-004
7-22
NonStop Server for Java
For information about invoking system routines from COBOL85 or FORTRAN, refer to
the COBOL85 Manual or the FORTRAN Reference Manual.
NonStop Server for Java
NonStop Server for Java allows creation of process pairs through the Java Native
Interface (JNI) to C and C++. Such process pairs are subject to the constraints
discussed in C and C++ on page 7-21.
Using a Process Monitor
A process monitor can ensure availability for:
•
NonStop process pairs in the unlikely event of a simultaneous failure of both
processes or of their processors
•
Applications that do not need the context-preservation features of process pairs
Your site can write its own process monitors, or you can use monitor products provided
by HP.
Site-Written Process Monitors
For some classes of applications, it is important only that a given process is available.
It is not always necessary to maintain context. For such applications, it is enough
simply to restart the application whenever it stops.
To restart a process whenever it stops, you can use a process-monitor process. Such
a process is written to receive Process Deletion messages from the processes it
monitors. Usually, the process monitor will be the parent process. On receipt of a
Process Deletion message from one of its children, the monitor process simply creates
the child again.
Unlike initialized persistent processes, processes that are restarted by a monitor
process must go through their initialization phase. A monitor process, however, can act
as a monitor to many processes.
If it is important that the child processes are kept running, then the monitor must also
be kept running so that it can ensure the continued execution of its children. For this
reason, process monitors are often designed as process pairs. If the primary process
stops, the backup process takes over the monitoring function.
If the primary process stops while processing a Process Deletion message, the backup
process needs to know whether that process was restarted. One way to solve this
problem would be for the primary process to maintain a table of processes it is
monitoring. Whenever processes are added to or deleted from the table, the table is
checkpointed to the backup process (or updated in the backup process). If the backup
process takes over, it can read the table and make sure that all processes in it are
running.