Eric,
First, define two tables; one that contains the feeds and one that
contains the items. Here are my table specs:
http://skitch.com/focusfriend/nf5yc/feedcentral
Like mentioned before, there are two processes (in my case running on
the server, all in JavaScript); one that periodically walks thru the
feeds and adds the new items (every 5 minutes), and one that serves
and generates the site when a user visits it. The main process is the
one that keeps the feed-items in sync and has the following steps:
[1] Retrieve feeds to be parsed (with a NextDB query on the "feeds"
table)
[2] Retrieve the individual feeds
http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q={feed}
[3] Insert new feed items
[4] Update feed signature
There are two important gotchas in this process; one is the
"signature" or offset of each feed during each sync interval so you
insert only the new items since the last sync and the other is the
feed item's timestamp for making a proper timeline and age indication.
You just can't rely on the timestamps or publish date in the feed
itself, so I use the parse timestamp in both UTC and epoch. And as a
signature I use the feed items' link of the youngest / top most feed
item, considering that this is unique for a given feed.
Because I run both processes on the server, I don't have to deal with
cross-domain issues. And everything is in well-structured JSON (both
the feed payload and NextDB queries), which makes live easy.
Enjoy! Ivo