Hello.
After teaching a course on protobuf and gRPC in Go, I’ve had requests for best organizational practices for the use of protobufs (and gRPC) at some degree of scale, and this does not appear to be something that is covered in the
protobuf.dev and
grpc.io sites, as opposed to the technical best practices.
Things like:
- how do you split your protobufs in packages/directories ?
- what kind of common fields or custom options (e.g. validators) should one add ?
- How do you store your .proto files: isolated repo ? all-projects monorepo ?
- And how should you commit your generated code per language ? One repo per language, language directories in the isolated protobuf repos, vendored in each project, or just generated on the fly ?
- Should you always include max items count for responses containing repeated items ?
- When do you switch paging from and id group to a timestamp, or a Bloom filter ?
Basically, all the questions a team is asking themselves to put these technologies in practice once they know how they technically work but are still green on actual production use.
Any pointers to resources welcome !