DEV Community

Code[ish]

75. gRPC

Robert Blumen is a DevOps engineer at Salesforce interviewing Doug Fawley, a software engineer at Google. Doug is also the tech lead for the Golang implementation of gRPC. RPC, in general, is a system which enables any client and server to exchange messages. gRPC is Google's extension to the protocol, with support for more modern transports like HTTP/2. This allows for features like bidirectional streaming and stream multiplexing. It also enables better interoperability with load balancing, tracing, health checking, and authentication.

To get started with gRPC, you would define your services and your messages using a language independent schema IDL protobuf. By explicitly stating what data you expect to receive, respond with, and error on, you can build a more reliable way of communication. In fact, many microservices have moved towards gRPC communication as opposed to something like REST, because of this level of introspection.

gRPC is not technically a standard; it is, however, open source, and many languages have implementations against its spec. There's a very active community building tooling and resources, and for that reason, many of the largest software companies in the world have begun to implement it for their services.

You can reach Doug on GitHub @dfawley.

  • gRPC is a high-performance, open source universal RPC framework.
  • protobuf is a language-neutral, platform-neutral, extensible mechanism for serializing structured data.
  • gRPC web provides a JavaScript library that lets browser clients access a gRPC service.
  • GRPCurl is a command-line tool that lets you interact with gRPC servers.

Episode source

Collapse
 
jonasbn profile image
Jonas Brømsø

Great episode. It has been lurking in my backlog for a long time, worth the listen.