Given that it's Sunday, I will write about fundamentalism, a topic that, like the rapture, I find endlessly fascinating. Quoting Wikipedia:
Fundamentalism is a continuing historical phenomenon, characterized by a sense of embattled alienation in the midst of the surrounding culture, even where the culture may be nominally influenced by the adherents' religion. The term can also refer specifically to the belief that one's religious texts are infallible ...
Don't worry, I'm not going to talk about real religion, but rather about fundamentalism in computing. I first encountered this phenomenon in the 1980s, when I hung out with declarative programmers. (Imperative programs are evil! Declarative languages will overcome!) Since then, I've watched with interest as other true paths are progressively revealed and embraced by communities large and small.
One interesting contemporary example is Web
fundamentalism (aka REST), a creed that admits to only four operations, POST, GET,
PUT, and
DELETE, and requires that arguments to a remote operation be encoded in a URL. So if I want to request
something like "start running executable E with arguments 42 and 29 on
a 2 GHz processor with 2 GB swap space," I might say:
POST http://www.X.org/run/exec=E%arg=42%arg=29%cpu=2GHz%swap=2GB
or (because I can encode things in URLs however I want):
POST http://www.X.org/runprog-E-42-29-2GHz-2GB
or ...
I first encountered these teachings when we started working with Web Services as a technology for grid. We
noted that in our systems management applications, we frequently encountered the need to initiate, monitor, and
manage remote stateful activities, and proposed that these common
interaction patterns be codified in standardized Web Service
operations. The resulting Open Grid Services Infrastructure (OGSI)
achieved that goal nicely, and we and many others have found both it and its
successors, WSRF and WS-Transfer, etc., tremendously useful.
Most Web people were welcoming of this work: for example, the response to my keynote talk at WWW 2002, at which I described Grid as "use case for Web Services," was really positive--people seemed genuinely delighted to see Web Services being applied to challenging system management tasks.
However, OGSI upset the Web fundamentalists. We were codifying operations to manage "state," and furthermore using Web Services to construct the messages used to request those operations in a structured manner? These views were anathema to some. We had to (a) pretend that state did not exist and (b) transfer requests to operate on that (nonexistent) state in unstructured strings, with no provision for abstraction, name space management, composition, or any of the other methods developed for managing complexity in 60 years of computer science research.
Of course, there is method to this madness: for example, distributed systems are often more robust and scalable if state is maintained in clients rather than services. However, it is a big and unwarranted leap to say that because services should often be stateless, they must always be stateless. Similarly, because HTTP can be used to construct simple interfaces for some purposes, it does not follow that all interfaces must be constructed in that way. A hallmark of fundamentalism is a desire to apply simple rules ("programs are declarative," "there is no operation but POST", "services are stateless") to all situations. But computing is a large and varied world, with few opportunities for absolutist statements.
When I first met Web fundamentalists, I found them irritating, because they would not debate on technical grounds. However, they have ultimately proved to be entertaining. One never knows what outlandish thing they will say next!
With all due respect, Ian, that example you gave shows me that you don't yet fully understand REST. IMO, REST shares a *lot* more in common with the goals of the Grid than it does with the goals of SOA/WS, so I think you'd be well served by digging through Roy Fielding's dissertation. Though a lot of new-to-REST people have claimed the dissertation is unapproachable, as an academic and architect I don't expect you'll have any problems. Cheers.
Posted by: Mark Baker | November 14, 2006 at 08:31 AM
"a creed that admits to only four operations, POST, GET, PUT, and DELETE, and requires that arguments to a remote operation be encoded in a URL."
If that is your understanding of REST then I'm sure it looks pretty silly.
Posted by: Joe Gregorio | November 14, 2006 at 09:24 AM
Computing is a large and varied world for sure. But surely the point of using HTTP as designed, as directly as possible, is to get the interop advantages of using a uniform interface/protocol?
Only last night I saw a protocol design which was built around using POST for all interactions. Amongst the open issues was reducing the overhead of passing fairly big messages around. If they'd have used GET where appropriate (probably half their operations) they'd have been able to take advantage of standard caches.
Posted by: Danny | November 14, 2006 at 02:29 PM
I was curious as to what would happen if I wrote something that was meant to be humorous and controversial. Would anyone notice? And if I did, would people appreciate my remarks, or would I strike the wrong tone, and come across as merely offensive?
The responses I received make me cautiously optimistic about blogs. First, the numbers of readers doubled overnight. Not necessarily good, but for someone who likes to be read, not bad either.
Second, I got some responses, and apart from one ad hominen attack (which I didn't publish as the email address given bounced), those responses engaged in a conversation.
In response to one of the responses: I have read Roy Fielding's dissertation. I *really* liked it, but was not convinced. However, that was a while ago, and I will read it again. Perhaps, as Mark suggests, I will return a REST convert. I'm feeling nervous already (-:
Posted by: Ian Foster | November 14, 2006 at 11:13 PM
Another hallmark of fundamentalism is Mystery.
Ian contributed a single-sentence functional description of "REST". The response he received was not "here's how that definition can be improved and made even more accessible" but "no no no you understand nothing you need to read another few hundred pages of text".
If someone can't seem to get to the point, it's often because they don't really have one.
(I appreciated that some-or-all distinction too, Ian -- that "simple rules applied to *all* situations" danger -- thanks for the essay, it was useful for me.)
jd
Posted by: John Dowdell | November 15, 2006 at 10:54 AM
"I have read Roy Fielding's dissertation. I *really* liked it, but was not convinced"
I don't follow, Ian. Convinced of what?
John - if somebody misuses a word, is it not useful and productive to point them at a dictionary?
Posted by: Mark Baker | November 15, 2006 at 03:08 PM
Hi Ian,
I think there's another "fundamental" issue, to use the word with another meaning. It's easier to build a community with simple tools than with complex ones. So we can see a lot of data mashups building on services from Amazon, Google and so forth, which use URIs and HTTP/get because it's really easy to do so. Conversely, current WS/SOA tooling is either cumbersome, expensive, or both, and the technology is implicitly more complex that URIs and HTTP/get.
Of course, that will only get people so far. At WWW2006 in Edinburgh, people from Amazon, Google et al were discussing the need to add security to these systems in order to support more commercial uses of the technology. Mostly they were suggesting new hacks to retrofit secure access on top of the existing system, and we all know that to be successful, security, like usability, has to be designed in from the start.
So there is a question of whether the simple approach has built up a sufficient community to carry throught the addition of more complex features such as security, or whether this community will balk at the extra effort required. Another question is whether the security-free approach is sufficient - as with the internet, which lacks a decent security layer. And will we have two separate communities for distributed web systems, one easy to use but limited and the other robust but too complex for the average developer?
Posted by: Dave Berry | November 15, 2006 at 09:41 PM
Ian, I guess I am one of you Web Fundamentalists :-)
Posted by: Mark Mc Keown | November 20, 2006 at 11:06 AM