Understanding gRPC, OpenAPI and REST and when to use them in API design (2020)
31–40 of 286 posts
Re: Understanding gRPC, OpenAPI and REST and when to use them in API design (2020)
#32always felt like grpc was unnecessarily inaccessible to the rest of us outside google land. the grpc js client unnecessarily heavy and kinda opaque. good idea but poorly executed compared to people who are familiar with the "simplicity" of REST
afaik grpc did callbacks before we got sse/ws/webrtc/webtransport. so grpc was needed kind of. and also canonical content streaming was in grpc. in http there was no common accepted solution at old times.
SSE was first built into a web browser back in 2006. By 2011, it was supported in all major browsers except IE. SSE is really just an enhanced, more efficient version of long polling, which I believe was possible much earlier.
Websocket support was added by all major browsers (including IE) between 2010 and 2012.
gRPC wasn't open source until 2015.
Re: Understanding gRPC, OpenAPI and REST and when to use them in API design (2020)
#33Unless you are doing bidirectional streaming (for which it seems pretty well suited, but I haven't used it, so it might be a fucking mess), grpc is usually a waste of time. Runtime transitive dependency hell, toolchain hell, and the teams inside Google that manage various implementations philosophically disagree on how basic features should work. Try exposing a grpc api to a team that doesn't use your language (parti…
Re: Understanding gRPC, OpenAPI and REST and when to use them in API design (2020)
#34My only work experience with gRPC was on a project where another senior dev pushed for it because we "needed the performance". We ended up creating a JSON API anyways. Mostly because that's what the frontend could consume. No one except for that developer had experience with gRPC. He didn't go any deeper than the gRPC Python Quick start guide and wouldn't help fix bugs. The project was a mess for a hundred reasons an…
Re: Understanding gRPC, OpenAPI and REST and when to use them in API design (2020)
#35Unless you are doing bidirectional streaming (for which it seems pretty well suited, but I haven't used it, so it might be a fucking mess), grpc is usually a waste of time. Runtime transitive dependency hell, toolchain hell, and the teams inside Google that manage various implementations philosophically disagree on how basic features should work. Try exposing a grpc api to a team that doesn't use your language (parti…
Re: Understanding gRPC, OpenAPI and REST and when to use them in API design (2020)
#36'rest' isn't anything (complementary)
Re: Understanding gRPC, OpenAPI and REST and when to use them in API design (2020)
#37Oof, I strongly disagree with this article's description of how REST apis are used, and the distinction between openAPI and rest. If I design a REST api in 2023, and in 2024 produce an openapi yaml or json file for that API with no other changes, is it somehow no longer a REST api? of course not. The article seems to be predicated on this distinction. > The least-commonly used API model is REST Is that true? I don't…
Re: Understanding gRPC, OpenAPI and REST and when to use them in API design (2020)
#38always felt like grpc was unnecessarily inaccessible to the rest of us outside google land. the grpc js client unnecessarily heavy and kinda opaque. good idea but poorly executed compared to people who are familiar with the "simplicity" of REST
Re: Understanding gRPC, OpenAPI and REST and when to use them in API design (2020)
#39REST is just pure bullshit. Avoid it like a plague. It's a fundamentally flawed model, as it smears the call details across multiple different layers: 1. The URL that contains path and parameters 2. The HTTP headers 3. The request body that can come in multiple shapes and forms (is it a JSON or is it a form?) As a result, OpenAPI descriptions end up looking horrifying, in the best traditions of the early EJB XML desc…
To avoid the complexity you mentioned, one would have to adopt some other tool like OpenAPI and it's code generators. At that point, you might as well use something simpler and plain better: like gRPC.