> You need to compile the protobufs and update all services that use them.
You need to update all the services when you change your REST API too right? At least protobufs generates your code automatically for you, and it can do it as part of your build process as soon as you change your proto. Changes are backwards compatible so you don't even need to change your services until they need to change.
The only real advantage of grpc and protobufs have are speed and reduced data transmission.
And hey fair enough man if those are your bottle necks.
And by doing that we've added extra layers and it ended up slower than it would have been had we just used regular rest.
Further more now we need to keep evoy up to date.
Occasionally they break their API on major versions. Their config files are complicated and confusing.
So, imo, grpc should only be used for service to service communication where you don't want to share the code with a UI and speed and throughput is very very important.
And speed of http 1 rarely is the bottleneck.
We could either maintain a grpc API and a rest API , or a grpc API plus envoy, or 1 rest API.
I am saying we should have picked 1 rest API and only switched to grpc if and when we ran into scaling problems.
Avoiding having to maintain grpc compilers and envoy in our security updates.
Idk I think people are expecting either too much or too little of these tools.
Those same endpoints are used with envoy. By our UI.
That choice was made to reduce code bloat.
Rather than maintain grpc and envoy it's easier to just maintain 1 rest API.
The service to service communication was never a bottle neck.
So it was highly prematurely optimized.
We spend way more time keeping evoy and our grpc compilers up to date and free of security issues than I would like.
It's just extra software and thus extra attack surfaces we didn't need. In retrospect
gRPC supports HTTPv1 and can be mapped to a RESTful API (e.g. https://google.aip.dev/131).
It ads an extra layer of complexity most people don't need.
You need to compile the protobufs and update all services that use them.
It's extra software for security scans.
Regular old http 1 rest calls should be the default.
If you are having scaling problem only then should you consider moving to grpc.
And even then I would first consider other simpler options.