rpc factory