Konubinix' opinionated web of thoughts

Roy Fielding's Misappropriated REST Dissertation

fleeting

Roy Fielding’s Misappropriated REST Dissertation

, because how many people really know what “RESTful” is supposed to mean?

https://twobithistory.org/2020/06/28/rest.html

with this Hacker News poster:

I’ve read several articles about REST, even a bit of the original paper. But I still have quite a vague idea about what it is. I’m beginning to think that nobody knows, that it’s simply a very poorly defined concept.

https://twobithistory.org/2020/06/28/rest.html

After reading Fielding’s dissertation, I realized that the much more interesting story here is how Fielding’s ideas came to be so widely misunderstood.

https://twobithistory.org/2020/06/28/rest.html

Fielding’s dissertation (titled “Architectural Styles and the Design of Network-based Software Architectures”) is not about how to build APIs on top of HTTP but rather about HTTP itself.

https://twobithistory.org/2020/06/28/rest.html

his dissertation presents REST as a distillation of the architectural principles that guided the standardization process for HTTP/1.1. Fielding used these principles to make decisions about which proposals to incorporate into HTTP/1.1

https://twobithistory.org/2020/06/28/rest.html

Fielding also felt that cookies are not RESTful because they add state to what should be a stateless system, but their usage was already entrenched

https://twobithistory.org/2020/06/28/rest.html

REST, for Fielding, was not a guide to building HTTP-based systems but a guide to extending HTTP.

https://twobithistory.org/2020/06/28/rest.html

Fielding establishes this taxonomy to emphasize that different constraints are appropriate for different applications and that this last group of constraints were the ones he felt worked best for HTTP.

https://twobithistory.org/2020/06/28/rest.html

deep, deep irony of REST’s ubiquity today. REST gets blindly used for all sorts of networked applications now, but Fielding originally offered REST as an illustration of how to derive a software architecture tailored to an individual application’s particular needs.

https://twobithistory.org/2020/06/28/rest.html

He warns, almost at the very beginning of the dissertation, that “design-by-buzzword is a common occurrence” brought on by a failure to properly appreciate software architecture

https://twobithistory.org/2020/06/28/rest.html

He picks up this theme again several pages later:

Some architectural styles are often portrayed as “silver bullet” solutions for all forms of software. However, a good designer should select a style that matches the needs of a particular problem being solved.5

https://twobithistory.org/2020/06/28/rest.html

Fielding later points out, it incorporates trade-offs that may not be appropriate unless you are building a distributed hypermedia application:

REST is designed to be efficient for large-grain hypermedia data transfer, optimizing for the common case of the Web, but resulting in an interface that is not optimal for other forms of architectural interaction.6

https://twobithistory.org/2020/06/28/rest.html

The constraints that REST imposes were carefully chosen to solve this anarchic scalability problem. Web service APIs that are public-facing have to deal with a similar problem, so one can see why REST is relevant there.

https://twobithistory.org/2020/06/28/rest.html

Yet today it would not be at all surprising to find that an engineering team has built a backend using REST even though the backend only talks to clients that the engineering team has full control over.

https://twobithistory.org/2020/06/28/rest.html

given that Fielding’s dissertation was all about avoiding silver bullet software architectures, how did REST become a de facto standard for web services of every kind?

https://twobithistory.org/2020/06/28/rest.html

Adopting REST’s constraints makes some sense, especially for public-facing APIs that do cross organizational boundaries and thus benefit from REST’s “uniform interface.”

https://twobithistory.org/2020/06/28/rest.html