Description
We have a large application that has 9 different gRPC services and we are currently trying to transfer them into a micro services architecture. Before, all of these proto files were in a single proto/
directory:
service/
proto/
foo.proto
foo.pb.go
bar.proto
bar.pb.go
...
Now, we are splitting each service out to run in its own kubernetes pod:
services/
foo/
proto/
foo.proto
foo.pb.go
bar/
proto/
bar.proto
bar.pb.go
...
We are running into issues where our foo
service returns a message that bundles a message from the bar
service, but the foo
service knows nothing about any of the bar
service's messages.
I have tried importing a bar_shared.proto
into the foo.proto
file to give it the required message but namespacing issues abound. I have run into issue #67. This makes me think that I'm using the wrong approach.
I wanted to get a reality check on our structure, and if there is a better way to accomplish what we are attempting to do. Should we create a master proto/
folder like before and have everything in the same namespace and include all the compiled pb files in each service?
Or is it bad practice to include the bar
service messages inside of a foo
service message?
Thanks!