Remote Procedure Calls
Why use Remote Procedure Calls?
Remote Procedure Calls (RPC) can be a very effective method of executing procedures or function calls on a remote machine and returning the data to a host machine with minimal delay, which requires little to no processing on the Client side.
NOTE: The diagram above only shows one call being made on the server, when in fact this one function could make up to 10 data calls to the controller and return them all in an array by simply having the client make one small function call.
What is required to make Remote Procedure Calls?
There are several steps that must be completed before an RPC can be made.
Server Application Details
Since the Server will be making all of the function calls that the User requests, all of the functions that you want to be able to command remotely must be written and compiled into the Server Application. Therefore, it is important to think about what functions will be included since the user will not be able to make any “unknown” calls to the Server Application.
Client Application Details
The Client application will be responsible in sending commands to the Server Application and present the returned data in a useful manner. The MPI procedures should be defined in a shared enumeration that is used by both the Server Application and Client Application, which helps prevent miscommunication between the Client and Server. Only create one enumeration. Defining more than one enumeration will only cause confusion and lead to future problems.
|| | Copyright © 2001-2010 Motion Engineering|