NonStop Server for Java 7.0 Programmer's Reference

A NonStop IPC socket supports both the modes of communication with the default being
BI-DIRECTIONAL.
BI-DIRECTIONAL mode
To support BI-DIRECTIONAL communication, the client establishes a second channel of
communication by opening the server process at the time of establishing a connection. At any
given time the second channel is in a state where the server can send data to the client. This is
achieved internally by the JI library by sending a dummy message to the server such that the server
can send data to the client in the form of a reply to the dummy message.
NOTE: The two channels are referred by the terms C2S (Client to Server) and S2C (Server to
Client).
Figure 6 (page 80) illustrates the events involved in establishing a connection with a named process
in BI-DIRECTIONAL mode.
Figure 6 Events in establishing a connection with a named process in BI-DIRECTIONAL mode
connect ()
(1) Open Server (C2S)
CLIENT APPLICATION SERVER APPLICATION
(2) Open Sever (S2C)
(3) Dummy Message (S2C)
Figure 7 (page 80) illustrates the events involved in establishing a connection with a TS/MP server
class in BI-DIRECTIONAL mode.
Figure 7 Events in establishing a connection with a TS/MP server class in BI-DIRECTIONAL mode
connect ()
(1) DIALOG BEGIN
CLIENT APPLICATION SERVER APPLICATION
(1a) REPLY with Process Information
(2) Open Server (S2C)
(3) Dummy MSG on S2C
It has to be noted that the second channel of communication is established by opening the server
process. In case where server process is a TS/MP server class the information necessary to open
the server process is sent to the client during establishing the first channel.
Request-response mode
The request response mode is straightforward and requires only one channel C2S. A client is
configured to work in this mode mainly when communicating with non JI server. Likewise, a server
socket is configured to work in this mode when communicating with a non JI client.
Communicating with non JI components
At times it becomes necessary for a JI client to communicate with legacy server or a legacy
application to communicate with a JI server. In such a situation, it is not possible to alter the legacy
application and JI component must be able to communicate with the legacy component. The
subsequent subsections discussion explain how JI components can interact with legacy components.
80 Java infrastructure