DCE Application Programming Guide
Application Design Considerations
HP NonStop DCE Application Programming Guide—429551-003
2-3
UDP Versus TCP Protocol Sequences
Client and Server Thread Blocking
Applications that make calls that block the process for significant periods of time
should use the TCP connection protocol.
The reason for using TCP is that the UDP protocol requires substantial processing by
special run-time threads. As described in Threading in DCE Run-Time Code on
page 3-3, the client and server run-time code threads must communicate
asynchronously with each other, both inside and outside the scope of a remote
procedure call. Some of the processing is time-critical; an application thread might
delay or prevent execution, causing RPC timeouts and extra network traffic.
Even the TCP connection protocol, however, relies upon timely server thread
execution, especially for establishing new connections from clients and for responding
to dced polling.
With the exception of SERVERCLASS_SEND_, SERVERCLASS_DIALOG_BEGIN_,
SERVERCLASS_DIALOG_SEND_, SERVERCLASS_DIALOG_END_, and
SERVERCLASS_DIALOG_ABORT_ jackets and TMF transaction demarcation jackets,
jacket functions are not provided. Without jackets to convert process-blocking system
calls into thread-blocking operations, it is more likely that an application thread might
block the entire process.
Server Capacity
In product version 1.1 of NonStop DCE, each process has a threads limit of 512 open
files. When choosing a protocol sequence, application designers need to consider the
number of file opens required for the UDP and TCP protocol sequences.
The RPC run-time code uses Guardian files for both the ncadg_ip_udp (UDP) and
ncacn_ip_tcp (TCP) protocol sequences. As Table 2-2
on page 2-4 shows, while
UDP requires just one file for each of the server and client protocols, TCP requires
multiple files.
Table 2-1. Choosing a Protocol Sequence
Issue Preferred Protocol
Client and Server Thread Blocking
on page 2-3 TCP
Server Capacity
on page 2-3 UDP
TCP/IP Fault Tolerance
on page 2-4 UDP