Our team uses a big mono repo like google. All microservices are a separate 
folder and placed in the same repo. The following shows the directory 
structure of one of our microservices:
service/main/identify
├── cmd
├── conf
├── dao
├── http
├── modelOur team uses a big mono repo like google. All microservices are a 
separate folder and placed in the same repo. The following shows the 
directory structure of one of our microservices:

service/main/identify
├── cmd
├── conf
├── dao
├── http
├── model
├── proto<here is *.proto and *.pb.go>
├── rpc
│   ├── client
│   └── server
└── service

Previously we used HTTP communication. Now we plan to migrate to grpc, but 
we don't know how to store proto files in each microservices. Now we think 
of two options:
1, copy
Manage the proto file by copying. If service A depends on service B, then 
service A needs to copy all proto files of service B into their own 
directory and generate the code. There is no direct interdependence between 
each service. A little copying is better than a little dependency.
2, dependent
Each project exposes its own proto folder, relies on the proto folder, and 
manages permissions and builds through Bazel, but this greatly reduces 
Bazel's build speed when there are too many
proto dependencies.
So if it is yours, how will you choose? What are the reasons?

├── proto<here is *.proto and *.pb.go>
├── rpc
│   ├── client
│   └── server
└── service

Previously we used HTTP communication. Now we plan to migrate to grpc, but 
we don't know how to store proto files in each microservices. Now we think 
of two options:
1, copy
Manage the proto file by copying. If service A depends on service B, then 
service A needs to copy all proto files of service B into their own 
directory and generate the code. There is no direct interdependence between 
each service. A little copying is better than a little dependency.
2, dependent
Each project exposes its own proto folder, relies on the proto folder, and 
manages permissions and builds through Bazel, but this greatly reduces 
Bazel's build speed when there are too many
proto dependencies.
So if it is yours, how will you choose? What are the reasons?

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to