(옷)장수네 집..

Monday, January 09, 2006

Google RSS Reader: Ajax and Continuations

Google RSS Reader: Ajax and Continuations: "

Niall Kennedy has disected the Google RSS Reader, which gives us a look into how Google does its thing.

Nick Minutello then took this further, looking into the Ajax lens and finding out about how Google uses Ajax and continuations.



So I was mucking around with Niall’s excellent reverse-engineering of the Google Reader, and I figured out that Google have some pretty must have some pretty funky (in a good way) framework to work with client/server interactions from Javascript.

The UI has a feature called the “Lens”, which allows one to scroll through blog posts. Posts are requested 20 at a time (and returned in an the Atom XML format). Once you scroll more than 20, another HTTP request is required. The usual way to do that would be to pass some kind of “start” parameter, but instead the Atom file contains a element which contains a unique ID (think of it as a session ID).


This id can be passed to the Google feed URL endpoint, and it will return the next 20 elements starting from where you left off.

E.g.: request: GET /reader/atom/feed/http%3A%2F%2Fdel.icio.us%2Frss%2Fpopular%2F response: COT3ruq0jYIC request: GET /reader/atom/feed/http%3A%2F%2Fdel.icio.us%2Frs"

0 Comments:

Post a Comment

<< Home