• The words are all messed up at this point, but RPC traditionally meant mechanisms like “procedure naming” and “marshal arguments and return values”. It’s designed to make remote procedure calls as convenient as local ones with respect to particular programming languages.

      So I’d say HTTP isn’t RPC because it’s not designed for, or convenient for, that purpose.

      You can make it do such things, but it takes extra work, and you also lose things like HTTP proxy support (middleboxes).

      If HTTP were RPC, then you wouldn’t have additional protocols like JSON-RPC tunneled inside HTTP. JSON-RPC specifies how your arguments and return values are marshaled.

      If HTTP were RPC, you wouldn’t have to say “HTTP POST”. Middleboxes understand HTTP verbs; they often don’t understand your custom protocol inside HTTP. The network isn’t just about the end points.

      Likewise, TCP/IP isn’t a protocol for hypertext, although you can use it that way. You have another layer with more semantics.


      score 38 · canonical

      • I get the reluctance but I still think it’s somewhat semantic from the server’s perspective:

        • HTTP verbs are cache controls, which is not unusual for RPCs (otherwise would be done in request metadata/headers/etc)-- middleboxes are generally aligned with this.
        • HTTP endpoints (or “resources”) are encoded procedure names

        To me, HTTP is a somewhat specialized kind of RPC (with specified caching and method encoding). We can of course build other kinds of RPCs on top of any RPC too.

        We can draw the line elsewhere, but at the very least HTTP is very close to being an RPC. :)


        score 2 · canonical