Do you really know why you prefer REST over RPC

1 point by leonsmith 8 years ago | 2 comments
  • dozzie 8 years ago
    > Both RPC and REST use HTTP protocol which is a request/response protocol.

    Uhm... No? Who lied you so horribly?

    > As far as I know, there are no particular rules for this style [RPC] but generally:

    No. You have just pasted REST-ish ad-hoc protocol. This is not RPC. RPC uses a properly defined protocol, such as XML-RPC or JSON-RPC or Thrift or gRPC, and it doesn't shit all over the place in URL router: the procedure to be called is encoded in the body of the request, along with parameters.

    • elvinyung 8 years ago
      It's all "justified":

      > In this post, when I talk about RPC I talk about WYGOPIAO: What You GET Or POST Is An Operation.

      When you consider RPC only as this extremely contrived protocol, of course REST is better.

      (I, too, don't know why the author is trying to pretend that this incredibly narrow specification is somehow representative of RPC in general.)