The Artima Developer Community
Sponsored Link

Java Buzz Forum
Google Reader, AJAX & Continuations

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Nick Lothian

Posts: 397
Nickname: nicklothia
Registered: Jun, 2003

Nick Lothian is Java Developer & Team Leader
Google Reader, AJAX & Continuations Posted: Jan 3, 2006 10:00 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Nick Lothian.
Original Post: Google Reader, AJAX & Continuations
Feed Title: BadMagicNumber
Feed URL: http://feeds.feedburner.com/Badmagicnumber
Feed Description: Java, Development and Me
Latest Java Buzz Posts
Latest Java Buzz Posts by Nick Lothian
Latest Posts From BadMagicNumber

Advertisement

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 <gr:continuation> 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.

EG:
1) request: GET /reader/atom/feed/http%3A%2F%2Fdel.icio.us%2Frss%2Fpopular%2F
2) response: <feed>...<gr:continuation>COT3ruq0jYIC</gr:continuation>...</feed>
3) request: GET /reader/atom/feed/http%3A%2F%2Fdel.icio.us%2Frss%2Fpopular%2F?c=COT3ruq0jYIC
4) response: Contains the next 20 elements

I'd really love to see the framework that is doing this stuff.

More realistically, I'd like to know the best way to only show unread items for a specific feed. I know I can grab the feed for each label, then for the feed, and loop over the feed entries looking for ones marked as read in the label feed, but there are a number of problems with that and it seems like there should be a better way. Any clues Chris?

Hopefully there's a way to do that so I can fix the things I don't like about Google Reader myself.

Read: Google Reader, AJAX & Continuations

Topic: [Dec 22, 2005 06:58 PST] 10 Links Previous Topic   Next Topic Topic: Fractal Duality and the Nature of the Universe

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use