2022-07-30

gRPC

gRPC logo

gRPC is a modern open source high performance RPC framework.

It was released by Google in 2016 as the next version of an internal project called Stubby.

https://grpc.io

gRPC allows you to describe the service and generate both code for clients and a “stub” for the server in popular programming languages.

gRPC example

Protobuf is used to describe the service. Unary “request-response” messages as well as streams of messages are supported.

service HelloService {
  rpc SayHello (HelloRequest) returns (HelloResponse);
}

message HelloRequest {
  string greeting = 1;
}

message HelloResponse {
  string reply = 1;
}

Can be particularly useful where there are several internal services communicating with each other. Due to the complex use of HTTP/2, gRPC is not supported by browsers.