DEV Community

Lucas Frota
Lucas Frota

Posted on

Explain gRPC Like I'm Five

Top comments (2)

Collapse
 
peteraba profile image
Peter Aba

I'm not sure it would work for 5 year olds, but here's my take:

gRPC is a platform agnostic communication protocol for applications over TCP client-server architecture. What this means is that it describes a server with specific endpoints which can be called by any client which is able to reach the server via the TCP protocol. You can think of these endpoints as you would with REST, providing an interface for a feature of the server. The fact that it's platform agnostic and that it uses TCP means that it's easy to use on any internet-enabled applications, independent of the OS it's running on or the programming language it's built with. There are many, possibly lesser known, protocols which enable such communications, but gRPC brings a few key features which set it apart from most other protocols:

  1. It's used by Google internally, so it is battle-tested
  2. Precisely described, typed messages help with finding errors easily
  3. Message exchange is in a pre-defined binary format, therefore it requires less bandwidth than exchanging plain XML or JSON objects.
  4. gRPC is quite popular therefore there are libraries for many programming languages already. (Google itself provides open sourced libraries for the languages it uses internally)
  5. Popularity also helps with good documentation and easily available help on various forums.

In one sentence you can think of gRPC as an alternative of Swagger, RAML or API Blueprint but perhaps geared more for the need of large organizations and private APIs for (micro-)services.

Collapse
 
lucasfrota profile image
Lucas Frota

Thanks! it helped me a lot