Pages in Internal

Architecture


The protobuf-rpc-pro libraries primary function is to enable fully duplex RPC calls multiplexed over a single TCP/IP socket connection. Due to this duplex nature, the component architecture is almost symetric on client and server sides. The picture below shows the libraries internal architecture. DuplexTcpClient/ServerBootstraps - These are the factories for client and server connections. PeerInfo - The identity of the client and server respectively, provided by hostname and port which is bound.

RPC Timeout


The RPC timeout feature allows a client to specify a time in milliseconds for the maximum allowed duration of a RPC call ( irrespective of whether the call is called using a blocking or non blocking method ). final ClientRpcController controller = channel.newRpcController(); controller.setTimeoutMs(1000); To enable monitoring of RpcServer side timeouts and RpcClient non blocking timeouts, it is necessary to register a RpcTimeoutChecker with the respective Bootstrap. The frequency of timeout checking and sizing of thread pool executors is configurable.