NonStop Server for Java 7.0 Programmer's Reference

Examples
Example 14 client_socket-lab.ind.hp.com:9080 process_name=MRSS
This means any client socket trying to connect to lab.ind.hp.com and port 9080 internally
connects to the process by name MRSS running on the same node as the client and establishes a
BI-DIRECTIONAL communication.
Example 15 server_socket-0.0.0.0:9080
This means a server socket that is listening for connections on any TCP interface (0.0.0.0) and
port 9080 internally listens for file opens on $RECEIVE with an open qualifier of Q9080 or for
any new dialog begin with a Pathsend qualifier of Q9080. For more information on how a
connection is established, see “Establishing a connection” (page 79).
Example 16 client_socket-prod.com:8083 pathmon=PROD:serverclass=LOGINSVC
This means any client socket trying to connect to prod.com and port 8083 internally establishes
a connection with an instance of the serverclass LOGINSVC in the Pathmon PROD. The connection
established is a BI-DIRECTIONAL communication. The Pathmon must be running in the same node
as the client.
Establishing a connection
As already explained, a NonStop IPC client socket sends data to the server either using FS API or
Pathsend API. But before sending the data, the client needs to establish a connection either by
explicitly opening the server process or by establishing connection through a Pathsend dialog.
Evidently, a server socket must accept only relevant connections. A server program can have
multiple server sockets that are configured as NonStop IPC server sockets. In this case each server
socket accesses $RECEIVE and accepts connections that are relevant to itself.
Since all server sockets read from the same $RECEIVE, there must be a mechanism for the client
socket to identify itself to enable the server socket to accept the connection. The open_qualifier
and pathsend_qualifier attributes help in establishing and verifying the socket identity.
When a client socket has to open a server process the value of open_qualifier attribute is
used as qualifier-1 while constructing the process name. For more information on
qualifier-1, see Process File Names and Named Processes in Appendix D in Guardian
Procedure Calls and Reference Manual.
When a client socket has to establish a connection with a TS/MP serverclass, the
pathsend_qualifier is sent to the server as the message in the dialog begin call.
A server socket listening for connections looks for the values of qualifier-1, in case of new
opens, and the message in a dialog begin call, in case of new dialog connections, to identify and
validate new connections.
This section explained how the client and server create a channel for communication by exchanging
identities using qualifiers. Subsequent sections explain why just a single channel is not sufficient
and one more channel of communication needs to be established.
Modes of communication
Traditional IPC on NonStop allows for a request-response mode of communication. Here a client
sends a message and the server responds to the message. The server cannot send unsolicited
messages to the client. This mode of communication is called REQUEST-RESPONSE.
In case of TCP communication, once a connection is established, data can be freely exchanged
between the participating sockets. This mode of communication is referred as BI-DIRECTIONAL
communication.
Establishing a connection 79