Availability Guide for Application Design
Designing Applications for Change
Availability Guide for Application Design—525637-004
10-42
Replacing a Library
The global-switch technique depends upon both V1 and V2 versions of the application
program being coded such that they provide the following:
•
The equivalent of a transaction monitor to receive and assign user requests to
either the V1 or V2 versions of the application. This process must be coded such
that requests rejected by the V2 version are routed to the V1 version until the V1
version has no outstanding requests.
•
Code for the V2 primary process to temporarily stop accepting new users if its
backup process fails during the transition, which causes new users to again be
assigned to the V1 primary process
•
Code for the V1 primary process to shut itself down when all outstanding work is
completed and no new requests are received within an arbitrary time.
The drawbacks to this technique are:
•
It requires more than twice the system resources of the replace-the-backup
technique
•
The monitor process, if written as a process pair, cannot use the global-switch
migration technique.
The global-switch technique works as follows:
1. The process pair named A runs in its normal resilient mode, where the backup
process becomes the primary process when the original primary process fails. The
primary process is in processor 1 and the backup process is in processor 2. Both
processes are running version V1 code.
2. A new process pair named B is started such that the primary process is in
processor 1 and the backup process is in processor 2. Both processes are running
version V2 code.
3. An operator utility such as an SCF module or a site-written interactive interface
sends a command to the application’s transaction monitor requesting it to switch
functions between the V1 and V2 process pairs, such that the V2 pair receive all
new user requests.
4. The V1 primary process runs out of requests to process, terminates its backup
process, and shuts itself down.
The migration is complete.
Replacing a Library
Sometimes updates or upgrades are needed in a library used by a running application.
You can replace such libraries without making the application unavailable; how you do
so depends on the kind of library file being used. Currently, all types of library files can
be replaced by forcing process migration.