ClickAider

Improved Berry Bloglines performance with Rails

Users of Berry Bloglines should notice snappier performance after a port to Ruby on Rails from the older CGI scripts, whose overhead had grown too high under increased load.

Tech notes:
The new implementation uses ruby-bloglines. Compared with the Universal Feed Parser, Ruby Bloglines currently has some limitations. It doesn’t handle ill-formed XML and rather than meaningful objects it returns nested hashes with some inconsistent structures.

Unfortunately, Bloglines is an example of a site that doesn’t generate valid XML! For instance, ampersands in feed titles or descriptions are not escaped as & causing a non-lenient XML parser to blow up. Although I won’t complain as harshly as Tim Bray does about invalid XML, I do hope the Bloglines team can clean this up as it makes life difficult.

A better RSS parsing option might be Ruby FeedTools or perhaps something built on top of RubyfulSoup, but the bloglines web services interface would need to be modified to use it.

4 Comments so far
Leave a comment

Did this change how it communicates with your site? I now get an error when connecting to Berry Bloglines - HTTP 404 - Connection Refused with www.thebogles.com:3000

Thanks

Since this change, my Berry Bloglines has stopped working. I now get a (non-hyperlinked) list of my feed folders, with an empty set of parentheses next to each one. Previously, it showed a long list of my actual feeds (and not the feed folders). Let me know if you’d like me to show you what I mean.

Er, wait… I just realized that I enabled JavaScript in the browser around the same time and that’s what broke it. When I turned JavaScript back off, my feeds worked again in Berry Bloglines.

Actually, there was a real bug in the display of feeds in folders (which I don’t use), but it’s fixed now.


Leave a comment

(required)

(required)