module Rpc_proxy:RPC proxiessig
..end
Rpc_proxy
module provides an improved reliability layer on
top of Rpc_client
. This layer especially features:Ideally, RPC calls look like local procedure calls. Because of failures and timeouts, they are fundamentally less reliable. The proxy layer adds some techniques that improve the reliability again. However, the same level as local calls provide cannot be reached.
In particular, network errors and timeouts are normally not hidden from the user. The semantics of RPC calls may change when they are repeated, especially when this is done on alternate network connections. The simple case of idempotent procedures is better handled, however: By definition, idempotent procedures can be again called without changing the semantics. The proxy layer supports this.
The proxy can be used together with the language mapping layer
generated by ocamlrpcgen
. Just do
module M = F_clnt.Make'P(Rpc_proxy.ManagedClient)
to get language-mapped procedure calls (where F_clnt
is the generated
client module, and P
is the name of the program).
module ReliabilityCache:sig
..end
module ManagedClient:sig
..end
module ManagedSet:sig
..end