Reputation: 35
I'm new in microservices ecosystem and I've just start study about gRPC. But I have a problem when I try to understand gRPC and Protobuf workflow.
First, I have a server and a client talk to each other via gRPC with NodeJS. Then I got a problem with my server so I have to fix it. But unfortunately, I have to change protobuf file too because I realize that error come from my gRPC Service.
So, for now I'm change protobuf file in both client and server manually. But I want to change(sync) proto file in client automatically(that's microservices, right?).
Please show me your method to make it auto! :(
Upvotes: 2
Views: 4032
Reputation: 46
The easiest way to automate this by extracting out your .proto file in a separate project and build a pipeline which will generate stub code and publish it to a common place. And then you can use that by adding it as a dependency to your client and server.
But as @Kenton said, you don't have to update your .proto file at the client for all the changes, it's backward compatible by default.
Upvotes: 3