Hacker News new | ask | show | jobs
by yoz 1841 days ago
To reiterate what someone else already said: no, REST was never meant to be “just RPC”. If you want RPC over HTTP, use something like JSON-RPC rather than trying to invent it yourself; its creators have already solved many of the problems that you’re about to hit.

The term REST (short for Representational State Transfer) was defined by Roy Fielding in a dissertation in 2000. There are many ways in which REST is better suited for web APIs than the RPC model: some of them are about communication and meaning, some are about flexibility, but mostly they’re about working with the web as it already IS, with browsers and servers and caches and load balancers and a whole load of other complexity. The RPC model sounds simpler at first, and in many ways it is, but that simplicity can hit some major problems when you try to scale up beyond a handful of different clients and servers.

For a deeper summary, take a look at the Wikipedia page: https://en.wikipedia.org/wiki/Representational_state_transfe...