Overview of asynchronous processing

Asynchronous processing provides a means of distributing the processing that is required by an application between systems in an intercommunication environment. Unlike distributed transaction processing, however, the processing is asynchronous.

In distributed transaction processing, a session is held by two transactions for the period of a “conversation” between them, and requests and replies can be directly correlated.

In asynchronous processing, the processing is independent of the sessions on which requests are sent and replies are received. No direct correlation can be made between a request and a reply, and no assumptions can be made about the timing of the reply. These differences are illustrated in Figure 1.
Figure 1. Synchronous and asynchronous processing compared
The picture shows two CICS regions, named System A and System B. Illustrating synchronous processing, Transaction 1 on System A is holding a synchronous conversation with Transaction 2 on System B; data flows back and forth over the session between them. Illustrating asynchronous processing, Transaction 3 on System A initiates Transaction 4 on System B, sends it a request, and terminates. Some time later, Transaction 4 on System B initiates Transaction 5 on System A and sends it a reply to Transaction 3's request. There is no direct correlation between the executions of Transaction 3 and Transaction 5.

A typical application area for asynchronous processing is online inquiry on remote databases; for example, an application to check a credit rating. A terminal operator can use a local transaction to enter a succession of inquiries without waiting for a reply to each individual inquiry. For each inquiry, the local transaction initiates a remote transaction to process the request, so that many copies of the remote transaction can be executing concurrently. The remote transactions send their replies by initiating a local transaction (possibly the same transaction) to deliver the output to the operator terminal (the one that initiated the transaction). The replies may not arrive in the same order as that in which the inquiries were issued; correlation between the inquiries and the replies must be made by means of fields in the user data.

In general, asynchronous processing is applicable to any situation in which it is not necessary or desirable to tie up local resources while a remote request is being processed.

Asynchronous processing is not suitable for applications that involve synchronized changes to local and remote resources; for example, it cannot be used to process simultaneous linked updates to data split between two systems.