62. Remote Procedure Calls (RPC)—Experimental Feature

Remote Procedure Calls, or RPC, is an inter-process communication that allows a computer program to cause a subroutine or procedure to execute in another address space.

Note: RPC is an experimental feature available only on C++11, for certain platforms. See the RTI Connext Core Libraries Platform Notes for the supported architectures. See also Experimental Features in the RTI Connext Core Libraries Release Notes.

RPC has two participants: a client and a service. Under the hood, the client uses a Requester to send requests and receive replies; the service uses a Replier to receive the requests and send the replies.

RPC over DDS uses a function-call style where the client/Requester directly calls the service/Replier by calling the service's functions, abstracting sending the request and receiving the corresponding reply on the client side.

Figure 62.1: RPC Overview

Connext supports both blocking and non-blocking interactions:

  • In a blocking (or synchronous) interaction, the client application blocks while waiting for the service’s answer.
  • In a non-blocking (or asynchronous) interaction, the client application can proceed with other work, ask if the service’s answer is already available, or wait for the service’s answer.

It is possible for a client to call more than one function at a time, particularly when asynchronous invocations are used.

62.2 RPC Client explains how a client application can use the method provided by the interface to perform both blocking and non-blocking interactions with the service.

Additional resources. In addition to the information in this section, you can find more information and example code here:

  • The Connext API Reference HTML documentation contains example code that will show you how to use the API: From the Modules tab, navigate to Programming How-To’s, RPC Tutorial.
  • The Connext API Reference HTML documentation also contains the full API documentation for the client-side and server-side APIs. Under the Modules tab, navigate to RTI Connext API Reference, RTI Connext Messaging API Reference, Remote Procedure Call.