Availability Guide for Application Design

Availability in the Pathway Transaction-Processing
Environment
Availability Guide for Application Design525637-004
6-27
Design Implications for TCP Requesters
A TCP running without persistence does not provide any protection against TCP
failure.
The NonStop TS/MP System Management Manual describes how to use the
NONSTOP and AUTORESTART parameters.
Keeping the application running requires more than simply keeping the TCP running. If
the TCP fails during normal operation, the following happens, assuming the TCP is
configured to run as a process pair:
1. TMF backs out the uncommitted transaction identified by the transaction identifiers.
In doing so, the database returns to a consistent state.
2. Using the checkpointed information, the backup TCP takes over as the new
primary TCP and starts processing from the point at which the backed out
transaction was started.
3. The transaction is reissued by the new primary TCP.
4. The new primary formulates the request for service again and sends it to the
server.
5. NonStop TS/MP reestablishes the link to a member of the desired server class.
Note that the selected server might or might not be the same process that was
used the first time. However, it will be a member of the same server class.
6. The send operation proceeds and the requester and servers continue their dialog
as before.
If the TCP is not running as a process pair but with immediate persistence, the
transaction is still backed out but the TCP must be reinitialized.
Design Implications for TCP Requesters
To write a highly available TCP requester program, the developer simply writes a
program in COBOL to run as one thread in the multithreaded TCP. Availability is
largely transparent; the code in the TCP already satisfies most of the availability needs
of the application.
Refer to the Pathway/iTS TCP and Terminal Programming Guide for details on how to
write requester programs in the Pathway transaction processing environment.
Development Concerns
Consider the following development concerns when designing a highly available TCP
application:
Ensure that TMF transactions are correctly coded in the requester with clear
transaction boundaries enclosing all critical input/output operations.
Ensure that your TCP requester is coded with adequate error handling capability.
Refer to Section 9, Minimizing Programming Errors, for general information on
error handling.