The EntireX C RPC Server allows standard RPC clients to communicate with servers written in C. It works together with the C Wrapper and calls standard libraries (Windows DLLs or UNIX shared objects/libraries). This document covers the following topics:
RPC requests are worked off inside the RPC server in worker tasks, which are controlled by a main task. Every RPC request occupies during its processing a worker task. If you are using RPC conversations, each RPC conversation requires its own task during the lifetime of the conversation. The C RPC Server provides two worker models:
FIXED
The fixed model creates a fixed number of worker tasks.
The number of worker tasks (defined with minworkers
) does not increase or decrease during the lifetime of an RPC server instance.
It is configured by setting the endworkers
to value "NEVER"
. Example:
endworkers=NEVER minworkers=4
SCALE
The scale model creates worker tasks depending on the incoming load of RPC requests.
A maximum number (maxworkers
)
of the worker tasks created can be set to restrict the system load.
The minimum number (minworkers
),
allows you to define a certain number of tasks - not used by the currently executing RPC request -
to wait for new RPC client requests to process.
In this way the RPC server is ready to handle many RPC client requests arriving at the same time.
It is configured by setting the endworkers
to value "TIMEOUT"
or "IMMEDIATE"
.
With value IMMEDIATE
, worker tasks shrink fast, that is, a worker task not used is stopped immediately as soon as it has finished its conversation,
except for the number of workers specified as minimum being active.
With value TIMEOUT
, worker tasks shrink slowly,
that is, all worker tasks not used are stopped in the time specified by the
timeout
, except for the number of workers
specified as minimum being active.
Example:
endworkers=TIMEOUT minworkers=2 maxworkers=6 timeout=60
The C RPC Server uses server interface objects to call the customer-written C server. The server interface objects contain, for example, version information, parameter descriptions and logic to call the C server. Both the server interface objects and C server skeletons are generated with the C Wrapper. All server interface objects are linked together to the library named Dlibrary-name(1).extension(2). Similarly all C Server are linked together to the library with name library-name(1).extension(2).
See also Locating and Calling the Target Server.
Notes:
library-name
of the library-definition
of the Software AG IDL.
For Windows, the server interface object file name is DEXAMPLE.dll and the C Server file name is EXAMPLE.dll.
For UNIX, the server interface object file name is DEXAMPLE.so or DEXAMPLE.sl and the C Server file name is EXAMPLE.so or EXAMPLE.sl.