RSC/MP 7.2 Programming Manual
HP NonStop Remote Server Call (RSC/MP) Programming Manual—522360-004
5-1
5 Application Design
This section shows you how to design an RSC/MP application. This section also shows
how to write an application in persistent mode and how to establish physical and virtual
connections between a workstation and a NonStop host.
Design Considerations
When designing RSC/MP applications, consider these factors:
•
The operating system environment (UNIX, Windows). Note that on some Windows
versions, you can run RSC as a Service.
•
The transport (TCP/IP, asynchronous, and so on).
•
The coding language that you are using.
•
The size of the messages you are using and whether you should use the Pathsend
product.
•
Whether to use TMF options to ensure data integrity.
•
Whether to use waited or nowaited I/O.
•
How to code the application to be persistent.
•
How to design your application to cooperate with other applications that are
running on a workstation that runs multiple applications.
•
The type of data exchanged between the RSC/MP requester on the workstation
and the server in the NonStop system, and if the data needs conversion.
Using the RSC/MP Thread-Safe Feature
A single-threaded application is not permitted to re-enter the RSC/MP API library.
Attempting to call any RSC/MP function while already inside an RSC/MP function (for
example, when handling a message in Windows or a signal in UNIX) will result in the
error code RSC_REENTERED.
RSC/MP provides a “thread-safe” feature for the Windows, Solaris and HP-UX
platforms which allows multiple simultaneous calls into the RSC/MP API library.
With this feature, every thread that uses the RSC/MP library must call
RscRegisterThread before calling other RSC/MP functions. RscRegisterThread
creates the internal context that RSC/MP needs to keep the thread’s state fully
independent of other threads. When finished using the RSC/MP library, the thread calls
RscUnregisterThread to clean up the internal context.
On platforms where the thread-safe feature is not supported, or where the developer
chooses not to use it, multithreaded applications must provide and use their own
locking schemes to prevent multiple threads from executing RSC/MP library functions
concurrently. Applications that do not use the thread-safe feature correctly and that do