4 ms·
There is a reason why more and more people left RPC and use REST. And for me "the next big thing" is something like GraphQL.
by progx 9y ago
There is a reason why more and more people left RPC and use REST.
And for me "the next big thing" is something like GraphQL.
- mpweiher 9y agoBring back SunRPC and CORBA!
- grizzles 9y agoImo it was mainly poor language / framework support for asynchronicity. That's not really an issue anymore.
- pjmlp 9y agoSo how is the modern way to work around issues like network partitions, servers not responding, going off and on on network connections, duplicate answers,....?
- grizzles 9y agohttps://web.stanford.edu/~ouster/cgi-bin/papers/rifl.pdf https://web.stanford.edu/~ouster/cgi-bin/papers/rifl.pdf This paper says that exactly once execution of an RPC is possible. I have no idea if grpc does this or not.
- vertex-four 9y agoFutures-oriented programming - helped by the "async" or "generators" support in quite a few modern languages. Wrap timeouts and retries around everything, and process the timeout errors accordingly. RPC doesn't mean that a remote function call looks exactly like a local one. That was a mistake. Modern RPC systems return composable futures which make it trivial to do timeouts and retries, send off many requests at once and wait for all/some of them to return, and so on and so forth. If you're doing something that shouldn't happen more than once, generate a transaction ID to identify it by.
- andrewingram 9y agoI strongly advocate GraphQL for client-facing APIs, and gRPC (or Thrift) for internal (or pure) APIs. REST was a breath of fresh air after SOAP, but unfortunately it is an incomplete solution and leaves too many unsolved problems in user-space. This has led to a proliferation of attempts to build standards on top of REST, such as JSON-API. When we're building systems, RPC is a more natural fit because the semantics are clearly defined.
- u320 9y agoREST isn't very widely used. Handwritten RPC protocols using HTTP/JSON is, though.
- deno 9y agoREST has been a complete failure from the very beginning. At best it maybe introduced some people to HTTP caching headers. Sad!