HUB Message Routing – Remote Host
The figure above depicts message routing for an external Automatic Entry initiated from an <<Ispec>> class or Report at application A (the client application) on Host A to application B (the server application) on Host B.
This process is detailed in the following subsections.
Message Initiation by the Client Application
The client application on Host A initiates an external Automatic Entry, as follows.
An external Automatic Entry from an <<Ispec>> class or Report in application A results in a call to the HUBSend procedure of HUBRouter, through the LINCSUPPORT library, from the COMSTP or Report program.
If a connection to Host B does not yet exist, a connection is established if possible. If a connection cannot be established, an appropriate message is returned.
Given that a connection to Host B does exist or has been established, the HUBSend procedure performs the following:
Allocates a response buffer to receive the response
Issues a subport write to the HUBRouter at Host B
The <<Ispec>> class or Report waits on an event that indicates the response buffer has been filled, or it waits for a user-defined timeout period (set in Glb.HubTimeOut) to expire.
Message Processing and Response by Server Application on Remote Host
The server application on Host B receives the message, processes the transaction, and initiates a response to Host A, as follows:
The Control procedure of HUBRouter on the Remote host receives the external Automatic Entry.
If the server application (application B) is not running or is not registered (:HUB+ has not been set), an appropriate error message is returned by the Control Procedure.
If the server application (application B) is running and registered, the Control Procedure forwards the request using a COMS TP-to-TP send (through INPUTROUTER) to the input queue of a COMSTP program in the correct subsystem of the server application.
The Server system COMSTP program processes the request.
When the server application has processed the request, the COMSTP program calls HUBResponse, which returns the response through a subport write to the corresponding subport in the HUBRouter procedure at Host A.
Response Processing by the Client Application
The client application processes the response from Host B as follows:
The Control procedure of HUBRouter on Host A receives the response from the remote application.
The Control procedure copies the response directly into the correct Response Buffer, and causes an event that wakes up the Client COMSTP or Report.
The Client COMSTP or Report that has been waiting for a response then wakes up and processes the response directly.