implement protobuf rpc