Websites/Mozilla.org/Archive/Design Implementation/RSS

From MozillaWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Note: This page refers to the relaunch of the site completed in August 2009 and is available for reference.

What we want to do

Bug 493099: Hook up news feeds on new www.mozilla.org home page.

We want a feed parser that

  • pulls latest feed info from feeds.mozilla.com for front page
  • pulls latest feed info from news.rdf (for now) for front page
  • optionally: creates mash ups of multiple feeds on sub-pages (e.g. Our causes > Education)

How to do it

Mozilla.org has a lot of visitors, so we probably want to cache feed items for some time to a) be nice to the feed provider and b) get better performance.

We probably want a database-based cache over a file-based cache, because it gives faster results.

TTL of the cached items can be relatively high (higher on the sub-pages than on the front page), because we offer the feeds to open up an additional window into the community and not to be a direct, always-up-to-date information resource.

Implementation

Overall ideas:

  • Use a cron-job to generate static html with the news items
  • Pull in the items from a db-based cache, refresh the cache occasionally

There are several different options (subject to evaluation).

Write a parser from scratch

  • + maybe better performance
  • + would hopefully be exactly what we want
  • - more development time
  • - not as well tested as other solutions

Zend Framework

  • New BSD license
  • very modular and flexible
  • PHP5 only (read: makes use of new OOP features, which is good)
  • well maintained, active development
  • DB abstraction layer, cache handling
  • some known issues, API a bit counter-intuitive in places
  • probably not as heavily tested as other solutions (because relatively new)
  • generally long turnaround time (bug filed to fix released)

PEAR

  • XML_Feed_Parser
    • LGPL license
    • No maintainer
  • XML_RSS
    • PHP license
    • No active development (last release 06)

SimplePie

  • BSD license
  • CURL extension required (need to check with reed, if it is enabled)
  • Caching out of the box (flat file only right now, but could be overloaded with own DB-class)
  • Meshing of multiple feeds out of the box
  • Problems with some feeds, but workarounds exist
  • Nice API
  • Goodies such as feed auto-discovery (feels a lot like Firefox ;)
  • Performance seems to be good with caching, but no idea, if it scales up nicely.

Magpie RSS

  • GPL license
  • No active development (last release 05)

PHP Universal Feed Parser

  • GPL license
  • seems to be a one-man effort
  • uses OOP methodology

Other