TS/MP Pathsend and Server Programming Manual (G06.24+, H06.03+)

Writing Pathway Servers
NonStop TS/MP Pathsend and Server Programming Manual–132500
4-4
Consideration for Servers Used With Remote Server
Call (RSC) Clients
For more information about the checkpointing strategy used by the TCP, refer to the
Pathway/TS TCP and Terminal Programming Guide.
Consideration for Servers Used With Remote Server Call (RSC) Clients
Some Remote Server Call (RSC) clients are written to check for an integer reply-code
value in the first two bytes of the server’s reply message. If the RSC client program calls
the RscSetOption function to set TMF_OPTION to either 2 (RSC_END_TRANS) or 3
(RSC_BEGIN_END_TRANS), the RSC transaction delivery process (TDP) monitors
this reply code from the server to determine whether the client should end the
transaction. The reply code is a feature that can allow optimization to reduce network
traffic. For further information about use of the RSC reply code, refer to the Remote
Server Call (RSC) Programming Manual.
Nested Servers
A Pathway server can use Pathsend procedure calls to make requests to servers in other
server classes. In such a case, the server is acting as a server with respect to the requester
that sends requests to it, but it is also acting as a Pathsend requester with respect to
another server. Servers communicating with each other in this way are known as nested
servers. Because they are Pathsend programs, nested servers must be written in C, C++,
COBOL85, Pascal, pTAL, or TAL.
If you use nested servers, you should try to prevent queues of requests from developing,
because a single-threaded server that calls Pathsend procedures waits for a response
before proceeding. Servers usually just wait for disk I/O, a high-priority activity. Waiting
for a low-priority server might tie up system resources.
For information about how to code the requester functions of nested servers (that is, how
to use the Pathsend procedure calls), refer to Writing Pathsend Requesters
. An example
of a nested server, called PATHSRV, is given in Example B-2 on page B-53.
Using Context-Free Servers With Context-Sensitive Requesters
Dialogs using context-sensitive requesters are described under Context-Sensitive
Pathsend Programming in Section 3. A context-free server-class send operation (initiated
by a call to SERVERCLASS_SEND_) is, in effect, a dialog consisting of a single send
operation. Pathway servers that are coded to be context-free can participate in single-
send dialogs with context-sensitive requesters. However, if these servers check for
system messages, you must modify them so that they recognize Pathsend dialog abort
system messages, as described under Writing Context-Sensitive Servers
later in this
section.