4 ms·
gRPC is a pain in the ass to setup. I strongly disliked the web client library for it. I don't like REST because it's basically become a specific url structure
by preommr 3y ago
gRPC is a pain in the ass to setup. I strongly disliked the web client library for it.
I don't like REST because it's basically become a specific url structure with semantic http methods (e.g. POST for create). Practically nobody bothers with the HATEOS stuff. Things start breaking down if you have a complex resource hierarchy and custom methods.
I've personally just settled on rpc using json. Any consumer of the api REST or otherwise is going to check the docs for the correct endpoint, at which point there's little to no difference between rpc and rest.
- mhoad 3y agoThis depends on your language of choice a lot but even still I don’t know how much I agree with it. It’s not at all obviously wrong on the surface, there is some setup involved in the sense you’re bringing at a minimum one new tool into your build process but you are picking up a LOT in exchange for that trade off from prebuilt client libraries down to an extremely efficient wire format. RPC using JSON sounds like the worst of both worlds to me. You ended up trading away a huge amounts of the benefits for things like code generation and general efficiency for a pretty reasonably one time setup cost. Maybe that’s different for the language of your choice I don’t know…