Tidy Up (and/or Document) `.proto` Files
See original GitHub issueDescribe request or inquiry
I have created this issue to request tidy up of (and/or documentation for) these two issues:
.proto
File Duplication - We might be able to tidy this up.- Inconsistent use of
.protos
- Most — if not, all — of this inconsistency is inevitable (because gRPC code generation works differently for the various programming languages used by the Online Boutique microservices).
1. .proto
File Duplication
- The following files are identical:
- The following file’s contents is a subset of the contents of the files above: /src/protos/Cart.proto
- The follow files are also identical:
2. Inconsistent Use of .protos
The way in which a microservice uses the .proto
files and generates its gRPC code depends on the programming language of that microservice.
Ideally, gRPC (and .proto
file) usage would be better documented for each microservice.
Here’s some info about the overall issue, for now:
What purpose/environment will this feature serve?
- Tidying up the
.proto
s will help reduce the learning curve of this repo, and make it easier for new developers to contribute and use Online Boutique.
What inspired this issue?
- A team at Google is using Online Boutique to showcase the Retail API. The team faced some friction while trying to refactor the
.proto
s for the Python microservices and the frontend service.
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Language Guide (proto3) | Protocol Buffers - Google Developers
This guide describes how to use the protocol buffer language to structure your protocol buffer data, including .proto file syntax and how to...
Read more >Using Protocol Buffers in Angular | by Justin Holiday - Medium
Use protocol buffers in angular applications. 1. Define Your Service. Create a proto/hello.proto file and define a HelloWorld service as follows: ...
Read more >prost-build - prost_build - Rust
prost-build` compiles `.proto` files into Rust. ... then you may need to clean up the documentation in order that cargo test --doc will...
Read more >Error using import in .proto file - Stack Overflow
You have to use the --proto_path command-line flag (aka -I ) to tell protoc where to look for .proto files. If you don't...
Read more >Introducing buf format - Buf.build
To see it in action, take this very poorly formatted .proto file: ... can clean up any syntactically valid Protobuf, no matter how...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In OpenTelemetry we started a fork and have some work done to remove these duplicate
.proto
files as part of the following PRs:Each service’s
Dockerfile
copies from/pb/demo.proto
and runsprotoc
to generate the language files at build time rather than checking them in. Just FYI 😃Wow, @mic-max, thank you so much for sharing your work!
I realized that the pull-requests (PRs) you shared contain changes (e.g., changes specific to the timestamp.proto that’s not found in our* repo) that are outside the scope of this GitHub issue (#814), so we might have to do some careful sifting to leverage the PRs. But we’ll definitely take inspiration from them (and I’m sure we’ll find them useful). And, of course, feel free to create PRs into our* repo (containing just the
.proto
file relocations).“our* repo” = github.com/GoogleCloudPlatform/microservices-demo