Andy Reitz (blog)

 

 

JavaOne: TS-7318: Beyond Blogging: Feed Syndication and Publishing with Java

Starts with overview of RSS, including uses for RSS, news readers, etc. Then moves into some more technical details of an RSS feed. Shortcomings of feeds:
  • Users need one-click subscribe (no standards yet) - Safari RSS doing a good job
  • 10% of all Feeds not well-formed XML
  • Feeds can be lossy (don't poll often enough, will miss stuff)
  • RFC 3229 (FeedDiff) can be used to address this
  • Polling based -- traffic waste; HTTP conditional get and caching ease pain
FeedParser (SAX based) and ROME (DOM based) -- two Java libraries for parsing feeds. Atom is the future of feeds? Atom is becoming an IETF standard, which leads credence to this theory. It is a comprehensive and rigorous specification. RSS 1.0 uses RDF (ick), RSS 2.0 has most of the same functionality, but tosses the complexity of RDF. How to serve feeds:
  • ROME serialization
  • XML DOM serialization
  • Template langauge: Velocity, JSP specification
  • Plop it on a web server that supports conditional HTTP GET, etags, etc.
Publishing Protocols:
  • OLD: XML-RPC based, ad hoc, simple: Blogger, MetaWeblog (most popular), Movable Type, WikiRPCInterface
  • New: The REST based Atom Publishing Protocol
  • Why not SOAP?
Atom publishing
  • Supports features of existing protocols
  • plus administrative features (add/remove users, etc)
  • spec still under development, will be finished soon
Atom collections
  • resources exist in collections
  • examples: entries, uploaded files, categories, templates, users
What is ROME?
  • Java library
  • RSS/ATOM feed parsers and generators
  • built on top of JDom
  • Provides beans as API
Why ROME?
  • existing solutions were incomplete, stale, had unfriendly un-Java API
Pros:
  • simple to use, well documented
  • single java representation of feeds
  • pluggable
  • widely used, got momentum
Cons:
  • Loss of information at SyndFeed level (abstract all feeds, lose special features of specific feed types)
  • DOM overhead