This sample will build a RPC client and server with a single request/response capability, running over Aeron UDP. Rendered as a sequence diagram, the flow is as follows:

rpc Client Server Connect Request Connection Opened Subscription Opened Subscription + Publication Opened Prepare Request Send Request Send Response Publication Created Prepare Response

Since Aeron is uni-directional, the RPC server requires that the server opens a connection to the client in response to a connection request. To enable dynamically defined clients, the ConnectRequest will include the necessary data requried to construct the publication on the server.

To keep the sample focused on the necessary Aeron wiring, all that the server will be doing is returning the string sent in the request in uppercase. Additionally, the sample will only support a single client - the Building the Server section provides an outline of how to support multiple concurrent clients.

The full sample is available on GitHub.