gRPC 101: The Simplest Guide You Will Ever Read

gRPC — A high performance, open source universal RPC framework

In last years, projects are mainly developed with “microservice architecture”. Since smaller things are much easier to handle, microservices look perfect to develop big and complex projects in a faster and more efficient way.

In the beginning, REST architecture were used to develop microservices but was it perfect enough? The answer is no because there are some points, which are about speed and efficiency, can be improved. Then, gRPC framework has come and it has been a game-changer!

Microservice architecture is a distinctive method of developing software systems that tries to focus on building single-function modules with well-defined interfaces and operations.

What is gRPC?

An RPC library and framework. gRPC is a modern, open source, high-​performance remote procedure call (RPC) framework that can run anywhere.

Why gRPC?

  • Simple service definition: Define your service using Protocol Buffers, a powerful binary serialization toolset and language.
  • Start quickly and scale: Install runtime and dev environments with a single line and also scale to millions of RPCs per second with the framework.
  • Works across languages and platforms: Automatically generate idiomatic client and server stubs for your service in a variety of languages and platforms.
  • Bi-directional streaming and integrated auth: Bi-directional streaming and fully integrated pluggable authentication with HTTP/2-based transport.

Protocol Buffers or Proto

Protocol buffers are Google’s language-neutral, platform-neutral, extensible mechanism for serializing structured data — think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages.



Disadvantages of gRPC

  • Lack of consistent error handling
  • Lack of developer tooling
  • Lack of infrastructure and monitoring support outside of Google Kubernetes Engine (GKE)
  • Limited insight into common practices
  • Lack of edge caching
  • Lack of support for additional content types