Rafael Sales wrote this article about gRPC as alternative to REST APIs. gRPC is an open-source remote procedure call framework and Protocol Buffers is a mechanism for serializing structured data.
A remote procedure call framework is used when applications running in different processes need to exchange data. It shouldn’t matter whether these are running in the same or different machines, or one is running in the cloud and the other in a desktop/mobile client.
The article briefly introduces gRPC and explores the core features of gRPC and Protobuf, and compare to JSON REST APIs.
gRPC uses HTTP/2 as its base transport protocol. It benefits from the multiplexing feature of HTTP/2 to execute requests/responses in parallel using a single TCP connection, reducing the hardware resources usage in both client and server compared when comparing to HTTP 1.1.
It also supports bi-directional streaming, which makes it capable of handling long communication patterns such as chat and file download/upload split in chunks.
Protobuf, for short, is a language-independent mechanism for defining structured data. To learn from what pieces Protocol Buffers consist and why Google has chosen them to use wit gRPC read the rest of the article. Super useful!
[Read More]