Remote Procedure Call - calling server functions like local methods/procedures.

gRPC - high-performance RPC framework created by Google

Protobuf - data serialization format created by google. .proto files store the schemas for the messages to generate the code for writing/reading data. It uses efficient binary encoding, field tags instead of names. Language neutral.

edition = "2024";
 
message Person {
  string name = 1;
  int32 id = 2;
  string email = 3;
}

Reflection API - without .proto files, stubs, it is an extension that enables the clients to dynamically discover the schemas of the messages a gRPC exposes at runtime

Types of gRPC

  1. unary: client server and gets response back
  2. server streaming
  3. client streaming
  4. bidirectional streaming

Disadvantages:

  • Tight coupling: if you modify the function name, clients have to switch too

Uses

  • inter-services communication, used a lot in distributed systems