News for hackers. Stuff that matters.
Re:A detailed comparison of REST and gRPC by rswail on Saturday April 29, 2023 @10:06AM (#35752980)
How are you using this web site? The entire thing is "discoverable".

What you're talking about is how can you publish a machine readable discoverable API. Just like RPC, there is no "well known" endpoint for getting the API specification.

The RPC IDL is effectively the same as "go read the docs". How is downloading a "formal published IDL" any different to a "formal published OpenAPI specification"?

gRPC just has an entire infrastructure of compilers, parsers and language libraries that generate stub code that you then have to go and "fill in".

OpenAPI is a pretty good standard for defining an HTTP based REST API.

Re:A detailed comparison of REST and gRPC by tweenagedream on Saturday April 29, 2023 @10:15AM (#35753064)
For gRPC, the protobuf is the API specification, a service definition with endpoints, what requests to those endpoints should look like and what responses look like. Of course, there are better and worse implementations, e.g. a well commented proto definition explaining what various args do, etc.

In gRPC the definition is a requirement to use, so at the bare minimum you have the typed structure of requests and responses. There is no such requirement for REST

Re:A detailed comparison of REST and gRPC by jeffbee on Saturday April 29, 2023 @11:42AM (#35753986)
gRPC has well-known services ServerReflection and ProtoDescriptorDatabase that allow clients to discover all available services, create request bodies, and parse response bodies, without having built-in protocol definitions. It is more discoverable than vanilla REST.