In this section, we will rewrite the JSON-RPC ring example to gRPC. This protocol differs from JSON-RPC because it requires a protocol declaration—a predefined interaction schema. This restriction is good for large projects, because you can't make a mistake in a message's layout, but with Rust, JSON-RPC is also reliable because you have to declare all structs exactly and you will get an error if you take an incorrect JSON message. With gRPC, you don't have to care about it at all.
Learning about gRPC
How gRPC works
The benefit of gRPC in comparison with JSON-RPC is speed. gRPC can work faster, because it uses a fast serialization format—Protocol Buffers. Both gRPC and Protocol Buffers were originally...