Skip to content

Commit 14f3c5e

Browse files
committed
format
1 parent 70736c4 commit 14f3c5e

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

www/content/essays/interviews/leonard_richardson.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -30,42 +30,42 @@ Leonard agreed to talk to me about the RMM and his experiences building Web soft
3030
**Question**: Can you give us some background about yourself and how you came into web programming? Did/do you consider
3131
yourself a hypermedia enthusiast?
3232

33-
When I was in high school in the mid-1990s, I got very basic Internet access through BBSes. There were all these
33+
> When I was in high school in the mid-1990s, I got very basic Internet access through BBSes. There were all these
3434
amazing, arcane protocols you had to learn to get around: FTP, Gopher, Archie, NNTP, et cetera. And then just as I went
3535
to college, the World Wide Web suddenly wiped out all of those domain-specific protocols. Within a couple of years we
3636
were using the Web technologies–URI, HTTP and HTML–for everything.
3737

38-
My formative years as a developer happened against the background of the incredible power of those three core
38+
> My formative years as a developer happened against the background of the incredible power of those three core
3939
technologies. Everything was being built on top of the Web, and it basically worked and was a lot simpler than the old
4040
way.
4141

42-
So yes, I am a hypermedia enthusiast, but it took me a really long time to understand the distinct advantages that come
42+
> So yes, I am a hypermedia enthusiast, but it took me a really long time to understand the distinct advantages that come
4343
from the "hypermedia" part of the Web. And that came with an understanding of when those advantages are irrelevant or
4444
undesirable from a business standpoint.
4545

4646
**Question**: Can you give us a brief history of early Web APIs? What was the origin story of the RMM?
4747

48-
What we now call "web APIs" started as a reaction against SOAP, a technology from a time when corporate firewalls
48+
> What we now call "web APIs" started as a reaction against SOAP, a technology from a time when corporate firewalls
4949
allowed HTTP connections (necessary to get work done) but blocked most other traffic (games?). SOAP let you serialize a
5050
procedure call into XML and invoke it over an HTTP connection, punching through the firewall. It was an extraordinarily
5151
heavyweight solution, using the exact same tools–XML and HTTP–you'd need to make a good lightweight solution.
5252

53-
Now that I'm an old fogey, I can look back on SOAP and see the previous generation of old fogeys trying to make the
53+
> Now that I'm an old fogey, I can look back on SOAP and see the previous generation of old fogeys trying to make the
5454
1990s client-server paradigm work over the Internet. SOAP had a lot of mindshare for a while, but there were very few
5555
publicly deployed SOAP services. When you deploy a service on the public Internet, people expect to connect to it from a
5656
wide variety of programming languages and programming environments. SOAP wasn't cut out for that because it was so heavy
5757
and demanded so much tooling to compensate for its heaviness.
5858

59-
Instead, developers picked and chose their designs from the core web technologies. Thanks to the dot-com boom, those
59+
> Instead, developers picked and chose their designs from the core web technologies. Thanks to the dot-com boom, those
6060
technologies were understood by practicing developers and well supported by every major programming language.
6161

62-
The RMM, as it's now called, was originally a heuristic I presented
62+
> The RMM, as it's now called, was originally a heuristic I presented
6363
in [a talk in 2008](https://www.crummy.com/writing/speaking/2008-QCon/act3.html). [The first part of the talk](https://www.crummy.com/writing/speaking/2008-QCon/act1.html)
6464
goes over the early history I mentioned earlier,
6565
and [the second part](https://www.crummy.com/writing/speaking/2008-QCon/act2.html) talks about my first experience
6666
trying to sell hypermedia-based API design to an employer.
6767

68-
I’d analyzed about a hundred web API designs for my book on REST and seen very strong groupings around the core web
68+
> I’d analyzed about a hundred web API designs for my book on REST and seen very strong groupings around the core web
6969
technologies. You'd see a lot of APIs that "got" URLs but didn't "get" HTTP. But you'd never see one where it happened
7070
the other way, an API that took advantage of the features of HTTP but didn't know what to do with URLs. If I had one
7171
insight here, it's that the URL is the most fundamental web technology. HTTP is a set of rules for efficiently dealing
@@ -74,58 +74,58 @@ with URLs, and HTML (a.k.a. hypermedia) is a set of instructions for driving an
7474
**Question**: In “How Did REST come to mean the opposite of REST?” I assert that the term REST has nearly inverted in
7575
its meaning. In particular, I claim that most APIs stopped at “Level 2” of the RMM. Do you agree with these claims?
7676

77-
Everyone understands URIs these days, and understanding HTTP is essential for performance reasons if nothing else. That
77+
> Everyone understands URIs these days, and understanding HTTP is essential for performance reasons if nothing else. That
7878
gets you to level 2, and yes, there we have stayed. That's what I was getting at
7979
in [this interview from 2007](https://www.infoq.com/articles/richardson-ruby-restful-ws/), a year before I gave my
8080
famous talk:
8181

82-
The big question in my mind is whether architectures consciously designed with REST in mind will “win” over
82+
> The big question in my mind is whether architectures consciously designed with REST in mind will “win” over
8383
architectures that are simple but only intermittently RESTful.
8484

85-
You don't get a certificate signed by Roy Fielding for achieving level 3\. The reward for learning and applying the
85+
> You don't get a certificate signed by Roy Fielding for achieving level 3\. The reward for learning and applying the
8686
lesson of hypermedia is *interoperability*. Your users get the ability to use your system in ways you didn't anticipate,
8787
and they get to combine your system with their other systems.
8888

89-
Interoperability is essential in a situation like the Web, where there are millions of server and client deployments,
89+
> Interoperability is essential in a situation like the Web, where there are millions of server and client deployments,
9090
and a dozen major server implementations. (There are now only two major client implementations, but that's its own sad
9191
story.)
9292

93-
For a long time I thought people just didn't get this and if I hammered on the technical advantages of hypermedia they'd
93+
> For a long time I thought people just didn't get this and if I hammered on the technical advantages of hypermedia they'd
9494
come around. But we've been stuck at level 2 for more than half the lifetime of the Web. It's become clear to me that
9595
most situations aren't like the Web, and the advantages of hypermedia aren't relevant to most business models.
9696

9797
**Question**: Level 3 style hypermedia controls never really took off in Web APIs. Why do you think that is?
9898

99-
I don't do this for everything, but I am going to blame this one on capitalism.
99+
> I don't do this for everything, but I am going to blame this one on capitalism.
100100
101-
Almost all actually deployed web APIs are under the complete control of one company. They have one server implementation
101+
> Almost all actually deployed web APIs are under the complete control of one company. They have one server implementation
102102
written by that company and one server deployment managed by that company. If the API has any official client
103103
implementations, those are also controlled by the company that owns the API. The fact that we say "the \[company\] API"
104104
is the opposite of interoperability.
105105

106-
Users like interoperability, but vendors prefer lock-in. We see that in their behavior. Netflix was happy to provide a
106+
> Users like interoperability, but vendors prefer lock-in. We see that in their behavior. Netflix was happy to provide a
107107
hypermedia API for their program data... until their streaming business became big enough. Once they were the dominant
108108
player and could dictate the terms of integration, Netflix shut down their API. Twitter used to cut off your API access
109109
if your client got too popular; then they banned third-party clients altogether.
110110

111-
There are lots of APIs that consider interoperability a strong point, and many of them are oriented around hypermedia,
111+
> There are lots of APIs that consider interoperability a strong point, and many of them are oriented around hypermedia,
112112
but almost all of them live outside the space of commercial competition. In 2008 when I gave the "maturity heuristic"
113113
talk I was working on software development tools at Canonical, which is a for-profit company but heavily involved in
114114
open source development. We wanted lots of tools and programming environments to be able to talk to our API, but the API
115115
was a relatively small part of our process and we didn't have enough developers to manage a bunch of official clients. A
116116
hypermedia-based approach gave us a certain flexibility to change our API without breaking all the clients.
117117

118-
After that I spent eight years working on ebook delivery in the US public library space, which is extremely fragmented
118+
> After that I spent eight years working on ebook delivery in the US public library space, which is extremely fragmented
119119
in terms of IT management. In a nonprofit environment with lots of independent server deployments, hypermedia (in the
120120
form of the [OPDS](https://opds.io/) protocol) was a really easy
121121
pitch. [I gave a talk about that.](https://www.crummy.com/writing/speaking/2015-RESTFest/)
122122

123-
To get the benefits of hypermedia you have to collaborate with other people in the same field, consider the entire
123+
> To get the benefits of hypermedia you have to collaborate with other people in the same field, consider the entire
124124
problem space, and come up with a design that works for everyone. Who's going to go through all that work when the
125125
reward is “no vendor lock-in”? People who are not competing with their peers: scientists, librarians, and open source
126126
developers.
127127

128-
It might or might not surprise you to learn that the library world is dominated by an antique protocol
128+
> It might or might not surprise you to learn that the library world is dominated by an antique protocol
129129
called [SIP](https://developers.exlibrisgroup.com/wp-content/uploads/2020/01/3M-Standard-Interchange-Protocol-Version-2.00.pdf). (
130130
Not the VoIP protocol, a different SIP.) SIP is what the self-checkout machine uses to record the fact that you borrowed
131131
the book. SIP first showed up in 1993, its design is distinctively non-RESTful, and in many ways it’s simply *bad*.
@@ -136,63 +136,63 @@ vendors. [I gave a talk about that, too.](https://www.crummy.com/writing/speakin
136136

137137
**Question**: Do you think the move from XML to JSON as a format had any influence on how Web APIs evolved?
138138

139-
Absolutely. Moving from XML to JSON replaced a document-centric design (more suitable for communications with a human at
139+
> Absolutely. Moving from XML to JSON replaced a document-centric design (more suitable for communications with a human at
140140
one end) with a data-centric design (more suitable for machine-to-machine communication). The cost was forgetting about
141141
hypermedia altogether.
142142

143-
One thing about Martin's diagram that I think obscures more than it reveals is: he calls level 0 the "Swamp of POX".
143+
> One thing about Martin's diagram that I think obscures more than it reveals is: he calls level 0 the "Swamp of POX".
144144
This makes it seem like the problem is (Plain Old) XML. Martin is actually talking about SOAP there. The big problem
145145
with SOAP services isn't XML (although they do have way too much XML), it's that they don't use URLs. A SOAP client puts
146146
all of the request information into an XML package and tunnels it through a single service endpoint. This makes SOAP
147147
opaque to the tools designed to manage and monitor and inspect HTTP traffic. This is by design, because the point of
148148
SOAP is to let you make RPC calls when your IT department has everything but port 80 locked down.
149149

150-
Anyway, XML is great\! It's too verbose to make an efficient data representation format, but XML has namespaces, and
150+
> Anyway, XML is great\! It's too verbose to make an efficient data representation format, but XML has namespaces, and
151151
through namespaces it has hypermedia controls (via XLink, XForms, XHTML, Atom, etc.). JSON has no hypermedia controls,
152152
and because it also has no namespaces, you can't add them after the fact.
153153

154-
People started adopting JSON because they were tired of XML processing and excited about AJAX (in-browser HTTP clients
154+
> People started adopting JSON because they were tired of XML processing and excited about AJAX (in-browser HTTP clients
155155
driven by Javascript, for those who weren't there). But that initial decision started constraining decisions down the
156156
road.
157157

158-
By 2011, all new web APIs were using a representation format with no hypermedia controls. You couldn't do a
158+
> By 2011, all new web APIs were using a representation format with no hypermedia controls. You couldn't do a
159159
hypermedia-based design if you wanted to. Our technical language had lost the words. First you'd have to define a
160160
JSON-based media type that had hypermedia (like Siren), or namespaces (like JSON-LD).
161161

162162
**Question**: What are your thoughts on GraphQL and other non-RESTful API technologies?
163163

164-
With regard to non-RESTful API technologies in general, I would suggest that folks take a break
164+
> With regard to non-RESTful API technologies in general, I would suggest that folks take a break
165165
from [chapter 5](https://ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm) of Roy Fielding's dissertation,
166166
and look at chapters [2](https://ics.uci.edu/~fielding/pubs/dissertation/net_app_arch.htm%20)
167167
and [4](https://ics.uci.edu/~fielding/pubs/dissertation/web_arch_domain.htm).
168168

169-
Chapter 5 is where Fielding talks about the design of the Web, but Chapter 2 breaks down all of the possible good things
169+
> Chapter 5 is where Fielding talks about the design of the Web, but Chapter 2 breaks down all of the possible good things
170170
you might want from a networked application architecture, only some of which apply to the Web. Chapter 4 explains the
171171
tradeoffs that were made when designing the Web, giving us some good things at the expense of others.
172172

173-
Chapter 4 lists five main advantages of the Web: low entry-barrier, extensibility, distributed hypermedia, anarchic
173+
> Chapter 4 lists five main advantages of the Web: low entry-barrier, extensibility, distributed hypermedia, anarchic
174174
scalability, and independent deployment. REST is a really effective way of getting those advantages, but the advantages
175175
themselves are what you really want. If you can get them without the Web technologies, then all you've lost is the
176176
accumulated expertise that comes with those technologies (although that ain't nothing at this point). And if you *don't*
177177
want some of these advantages (probably distributed hypermedia) you can go back to chapter 2, start the process over,
178178
and end up with a differently optimized architecture.
179179

180-
I don't have any direct experience with GraphQL, though I'm about to get some at my current job, so take this with a
180+
> I don't have any direct experience with GraphQL, though I'm about to get some at my current job, so take this with a
181181
grain of salt:
182182

183-
On a technical level, GraphQL is solving a problem that's very common in API design: performing a database query across
183+
> On a technical level, GraphQL is solving a problem that's very common in API design: performing a database query across
184184
a network connection without sending a bunch of unneeded data over the wire. Looking at the docs I see it also has "
185185
Mutations" which seem very SOAP-ish. I guess I'd say GraphQL looks like a modern version of SOAP, optimized for the
186186
common case of querying a database.
187187

188-
Since GraphQL is independently deployable, supports multiple server implementations and defines no domain-specific
188+
> Since GraphQL is independently deployable, supports multiple server implementations and defines no domain-specific
189189
semantics, an interoperable domain-specific API could be built on top of it. Rather than exporting your data model to
190190
GraphQL and clashing with a dozen similar data models from the same industry, you could get together with your peers and
191191
agree upon a common set of semantics and mutations for your problem space. Then you'd have interoperability. It's not
192192
much different from what we did with OPDS in the library world, defining what concepts like "bookshelf" and "borrow"
193193
mean.
194194

195-
Would it be RESTful? Nope\! But again I'll come back to SIP, the integration protocol that public libraries use to keep
195+
> Would it be RESTful? Nope\! But again I'll come back to SIP, the integration protocol that public libraries use to keep
196196
track of loans. SIP is a level zero protocol\! It doesn't use any of the Web technologies at all\! But it provides
197197
architectural properties that libraries value and vendor-centric solutions can't offer–mainly interoperability–so it
198198
sticks around despite the presence of "RESTful" solutions.

0 commit comments

Comments
 (0)