๐Ÿ”— API Patterns and Practices: gRPC
Chapters Examples Bibliography GitHub โ†—
Home / Protocol Buffers: the Contract Language
Part 2 3 chapters

Protocol Buffers: the Contract Language

Model the shipping domain in protobuf and make it the Buf-enforced single source of truth both stacks generate from.

Chapter 3

Protocol Buffers in depth

The proto3 language in full: scalars, messages, enums, oneof, map, packages, options, field presence, and the tag-number math that turns a message into bytes.

24 minRead โ†’
Chapter 4

Well-known types and JSON mapping

Timestamp, Duration, FieldMask, Any, Struct, and the wrapper types, plus the canonical proto3-to-JSON mapping that renders them at the REST and grpcurl edges.

19 min readRead โ†’
Chapter 5

Contract-first with Buf

Gate the shipping proto with buf lint, buf build, and buf breaking, generate stubs on both stacks, and serve RoutingService.GetQuote end to end, traced.

22 min readRead โ†’
โ† Previous part Why gRPC, and the Decision Lens Next part โ†’ HTTP/2 & the Four RPC Types

API Patterns and Practices: gRPC

Designing gRPC APIs well, with runnable examples in Quarkus and Python against one Protobuf contract.

Site

  • Outline
  • Bibliography

Reference

  • Protocol Buffers โ†—
  • Buf โ†—
  • gRPC docs โ†—
  • View on GitHub โ†—
  • Issues โ†—
Open source ยท MIT Last built 2026-10-17