1. A computer-implemented method for a remote procedure call (RPC) with call-by-reference semantics, comprising: establishing, by a processing device, a session between a client and a server; initializing a client session heap memory and a server session heap memory with a remote direct memory access (RDMA) provider; storing a parameter in the client session heap memory of the client, wherein the parameter comprises a value stored at a memory address in the client session heap memory; passing a handle for the parameter to the server, wherein the handle comprises a reference to the memory address of the parameter in the client session heap memory; and permitting the server to access the value of the parameter stored in the client session heap memory responsive to an on-demand request from the server, wherein the program code is further executable by the processor for: caching a parameter state within a session; and responsive to a repeating RPC within the session, reading only modified parameters.