Under the Surface
Sanjiva Weerawarana: What about Google maps- is that RESTful? Can you give me the URIs to each and every map block at different resolutions?
Mark Baker: Erm, yes.
Here’s the proof:
$curl --head "http://kh3.google.com/kh?n=404&v=14&t=tqstqrtqqttqqsqqrsrr" HTTP/1.1 200 OK Content-Type: image/jpeg Expires: Thu, 21 Feb 2008 12:47:39 GMT Last-Modified: Fri, 17 Dec 2004 04:58:08 GMT Server: Keyhole Server 2.4 Content-Length: 13507 Date: Wed, 21 Feb 2007 12:47:39 GMT
Note the cache control headers. They use Last-Modified instead of ETag, but they still achieve the same result: they converted a single web service (call me with a bunch of information, and I will provide you with a custom result) into a large number of individually addressable, cacheable, and scalable web resources.
google maps is RESTful
Mark and Sam point out that I was wrong to say that Google maps did not have URIs for each map block. My mistake; I stand corrected. I do have a question for Sam: Did you figure out that lovely URI "...Excerpt from Sanjiva Weerawarana's Blog at
Did you figure out that lovely URI by hand
Like Asbjørn, I don’t consider that URI lovely, but on the other hand, I don’t consider it completely wrong. The URI query syntax has a specific meaning for CGI applications, and HTML forms have built in support for it, but I somehow doubt that Google is using a CGI here, nor does the typical interface to this data use forms. *shrug*
As to the question about how I figured this URI out, it actually is rather simple: I merely zoomed into the desired location, and then (with FireFox), I clicked with my right mouse button. The first option, View Image, was exactly what I needed to isolate that image; I then simply copied the URI from the address bar into my post.
Now, it is a pity that Sanjiva’s blog doesn’t support comments, so I’ll continue my response here.
If you got it by intercepting the messages then I’d argue that its not sufficiently RESTful.
Arguably, that’s exactly what I did, albeit augmented by a tool. A tool that isn’t “Google maps aware”, or even “schema aware”. Instead it is aware of one thing that often tends to be vastly more important, namely that one often finds important hypertext links embedded inside of content.
So here I differ with Sanjiva. This knowledge doesn’t make either Google maps or Firefox “not sufficiently RESTful”. To the contrary, I’d argue that hypermedia as the engine of application state is one of the defining characteristics of a preeminently RESTful application.
Posted by Sam Ruby atSam Ruby: Under the Surface
This knowledge doesn’t make either Google maps or Firefox “not sufficiently RESTful”. To the contrary, I’d argue that hypermedia as the engine of application state is one of the defining characteristics of a preeminently RESTful application....Excerpt from del.icio.us/tag/rest at
ETags are not a panacea
panacea © Rufino panacea: A remedy for all diseases, evils, or difficulties; a cure-all. From Answers.com In my post “ That Darned Cat! - 1 ”, I complained about Twitter performance, and peeked at some of their HTTP headers noticing they...Excerpt from Patrick Mueller at
How come this entry doesn’t have a comment feed associated with it? :-|
Posted by Asbjørn Ulsberg at
Per entry comment feeds disappear after 90 days.
Of course, since you have commented on this entry, the feed is now back, and the clock has been reset.
Posted by Sam Ruby atOh, but now it does all of a sudden! :-) A magical rebuild from new templates did it, I persume? Either way; nice!
Posted by Asbjørn Ulsberg at
Excellent example, although I think it’s completely wrong that you can only address a static resource with a query string.
Posted by Asbjørn Ulsberg at