We seem to have pretty widespread consensus, these days, that HTTP, or perhaps the RESTful approach it exemplifies, offers a pretty sweet substrate for pushing and pulling data around at Web scale. We got further evidence this week when a bunch of smart people stepped slightly outside its sweet spot, into deep tangly weeds.
Wikipedia No · I think Joe’s analogy with Wikipedia is bogus. At Wikipedia, each entry is a resource. So is each section and sub-section and sub-sub-section and so on. There’s nothing at all in REST to say that resources can’t be part of other resources, and there’s no ambiguity at all what’s going on at Wikipedia. Unfortunately, at Wikipedia there’s no way to do what Joe’s trying to: update more than one disjoint section at a time.
It’s Important · The problem Joe’s trying to solve keeps coming up. Despite my skepticism about the analogy, I think his URI-templates approach is potentially a winner. Like Sam, I’m not crazy about verbs in URIs, but maybe, seen correctly, these are adverbs.
There’s some history here, private and public. Way back in 2004 I was trying to get Google to buy into the APP idea, and had a meeting with Adam Bosworth and Mark Lucovsky, who are obviously both heavyweights. They both were friendly to the idea, but had an immediate question: You’ve got a decent way to create or update a Web resource, but what if you want to update ten thousand, can you avoid doing an HTTP exchange for each? What about the idea of POSTing an Atom feed rather than an Atom entry?
I thought that sounded plausible; Google joined the Atompub WG and in fairly short order the POST-a-feed idea came up. And in fairly short order after that, it got shot down. People thought up all sorts of corner cases and problems. The two that stick to my mind were authorization and error handling. Can you specify different auth data for each of the ten thousand entries in the feed, and how do you react when twenty-seven of the ten thousand fail to update for some reason or another?
I was disappointed, but thought “Well, YAGNI, maybe.” Since then, there’s been Yaron Goland’s Web3S proposal, whose raison d’etre was update at other than the singular-resource level. (Hmm, wondering what happened to Web3S?)
So this is something that obviously keeps coming up.
It’s Hard · I have the advantage here of having spent three years co-chairing an IETF Working Group, a role whose chief function is to discern or decree the existence of consensus. Speaking on the basis of that experience, I can tell you authoritatively that we do not have consensus here; rough, smooth, or any other kind.
But it’s totally worth arguing about.