eRPC
eRPC Documentation

eRPC is a fast remote procedure call library designed for datacenter networks. The source code is maintained on GitHub. Our USENIX NSDI paper describes eRPC's design in detail.

See the API documentation tab for details on how to use eRPC. Using eRPC requires the following steps:

  1. Create a Nexus to initialize the eRPC library
  2. Register request handlers using Nexus::register_req_func
  3. For an RPC server thread:
    • Create an Rpc end point using the Nexus
    • Run the event loop with Rpc::run_event_loop. The request handler will be invoked when requests are received from clients.
    • Create the response in the request handle supplied to the handler. Use Rpc::enqueue_response to send the reply.
  4. For an RPC client thread:
    • Create an Rpc endpoint using the Nexus
    • Connect to remote endpoints with Rpc::create_session, specifying the server's "control network" hostname. The connection handshake is done over the kernel's network stack.
    • Create buffers to store request and response messages with Rpc::alloc_msg_buffer
    • Send a request with Rpc::enqueue_request, specifying a continuation callback
    • Run eRPC's event loop with Rpc::run_event_loop
    • The continuation will run when the response is received, or when the request times out