🔌 gRPC
Beginner
What is Protocol Buffers (Protobuf)?
Answer
Protocol Buffers (Protobuf) is a language-neutral, platform-neutral, binary serialization format developed by Google. You define data structures (messages) and service interfaces in .proto files using a simple IDL syntax, then compile them with the protoc compiler to generate strongly-typed data access classes in your target language (Go, Java, Python, C++, etc.). Protobuf is significantly more efficient than JSON or XML: it produces smaller binary output (3–10x less data), faster serialization/deserialization (5–100x faster), and provides compile-time type safety. The tradeoff: binary format is not human-readable, unlike JSON. Protobuf is used by gRPC as both the service definition language and the over-the-wire serialization format.