4 ms·
> Both RPC and REST use HTTP protocol which is a request/response protocol. Neither REST nor RPC is tied to HTTP at all. I think the title alone of section 6.3
by andrewstuart2 11y ago
> Both RPC and REST use HTTP protocol which is a request/response protocol.
Neither REST nor RPC is tied to HTTP at all. I think the title alone of section 6.3 of Fielding's dissertation, "REST Applied to HTTP", [1] should be enough to convince anybody that they're completely orthogonal concepts, much less the rest of the actual dissertation. The Wikipedia article for RPC [2] also provides numerous examples of RPC implementations that never even touch TCP, much less HTTP.
REST is literally just transferring some state via a representation. RPC is literally just calling a procedure remotely.
Also, yes, hatred of expecting different behaviors from different verbs is irrational. Because verbs indicate actions, and different verbs indicate different actions. It works well in written/spoken language, and it works well in REST and HTTP.
[1]https://www.ics.uci.edu/~fielding/pubs/dissertation/evaluation.htm#sec_6_3 https://www.ics.uci.edu/~fielding/pubs/dissertation/evaluati...
[2]https://en.wikipedia.org/wiki/Remote_procedure_call https://en.wikipedia.org/wiki/Remote_procedure_call
- deleted 11y ago[deleted]
- augustl 11y agoCan confirm, anecdotally. I've used REST over ZeroMQ REQ/REP sockets, for example.
- resu_nimda 11y agoAlso, yes, hatred of expecting different behaviors from different verbs is irrational. To be fair, you've kind of rephrased her point into a strawman that's simply opposed to the abstract concept of verbs. Most of the time, people understand URLs as a one-to-one mapping - each URL has only one meaning, one website. It's not until you actually start writing code to create or consume an HTTP API that you need to learn the concept of the different verbs. In spoken language you don't become functionally fluent with the language and then some time later have a new concept of verbs introduced. So I can understand why the idea that "actually a URL (the part that everyone sees and knows) can have multiple meanings based on this hidden parameter" can feel wrong.
- andrewstuart2 11y agoIn defense of the way I phrased that, here's the direct middle section of his tweet: "... different behaviors based on the verb..." It's very very deliberately called an HTTP verb, for a reason. It's not that I expect the average person, or even a new developer, should know that HTTP verbs exist or that URLs and URIs literally locate and identify resources in a uniform way. The part that bothers me is that when you deliberately write a blog about the subject that other developers may see and take as credible, you ought to put more effort into making sure your information is accurate before publishing.