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 developed by Google and are proven in high-performance cases.
gRPC uses HTTP/2 for transport. It's a really fast and good transport protocol. First, it's binary: all requests and responses are squeezed into a compact portion of bytes and compressed. It's multiplexed: you can send a lot of requests simultaneously, but HTTP/1 demands respect for the order of requests.
gRPC needs a scheme and uses Protocol Buffers as the Interface Definition Language (IDL). Before you start writing an implementation of a service, you have to write the proto ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access