I’ve been playing with PubSubHubbub (PuSH) and Superfeedr for several hours now, and overall I’m mainly just disappointed. I’m not sure who is to blame, but it’s not the plug-and-play experience I had hoped for.
The Goal
I actually have a purpose, not just play. I wanted to sync up the Obsidian Portal blog (Atom feed available) with the Obsidian Portal homepage. Essentially, we’d like to display a teaser from the latest post on the blog, along with a list of some other recent posts that might be interesting.
The Plan
After putting it in the back of my head for a while, the idea of using PuSH to handle syncing the blog entries over to Obsidian Portal jumped to the forefront. The basic idea was simple: instead of building an RSS poller/parser/whatever, just have someone POST notifications of new blog entries directly to the main Obsidian Portal app. That’s exactly what PuSH is for. Excellent!
Looking around, I found that Superfeedr was a PuSH hub that seemed perfect for this kind of thing.
Poll vs Notify
The first thing I did was start playing around with using Superfeedr to poll the blog feed. This immediately became a frustrating experience. The polling speed was 15 minutes, so every little test/debug/experiment I wanted to try had a 15 minute window. Completely unacceptable.
So, I went out and downloaded a WordPress plugin to support PuSH on the blog side. Now the blog should send notifications to Superfeedr so there would be no need for polling.
Um…nope. I’m not sure if it’s the plugin or Superfeedr, but it’s still polling at a rate of about every 15 minutes. It’s sometimes faster, but on the order of 5-10 minutes instead of 15. That makes it tough to do the sort of playing around that is necessary to figure out the quirks of a new tool.
Post body, not params
Now, this is my own damn fault, so blame lies squarely in my lap on this one. I just want to make sure that other Rails guys reading this know not to make the same mistake.
The Atom entry you receive as part of a notification is in the POST body, not a parameter! This took me a long time to figure out (long time due to waiting 15 minutes between tests, due to polling
). Here’s eventually what I did in the action that receives a notification:
atom = request.body.read
Now you’ve got the Atom text and can parse and go.
Summary vs Content
The next wtf? moment came when dealing with summary vs content. In the Atom protocol, it’s possible to have both the full-text content and a summary. This would be perfect for me, since I could leave the full-text content for any Atom subscribers we have, while using the summary field for the excerpt that appears on the Obsidian Portal homepage. WordPress actually puts a summary/excerpt in by default. Excellent!
Bad news adventurers: For some reason, Superfeedr only displays the summary element if there is not already a content element. So, it’s content XOR summary. There may be a valid technical reason for this, but otherwise it makes absolutely no sense to me. Why truncate possibly valuable data? Why not preserve the underlying Atom feed as closely as possible?
An easy solution for me is to remove the content and only include the summary, which WordPress supports out of the box. Still, I really hate this, as I (as a user) much prefer when a feed includes the full text of the article. None of that “come to the site and see all my ads to read the rest!” crap. It irritates me that I’ve been unnecessarily backed into this corner.
No Updates
The worst thing of all is that Superfeedr doesn’t seem to send notifications for updated entries, only sparkly new ones. This is completely unacceptable for my purposes. Let’s examine a common scenario:
Blog post: “Go their too read more…”
First 20 comments: “You used the wrong ‘there’ and ‘to’, dumbass…”
Ok, so I update the blog post and thank the commenters for their kind words. Still, Superfeedr never sends a notification, so the changes aren’t reflected on the Obsidian Portal homepage which gets seen by way more people than the blog.
This decision really has me scratching my head. The Atom protocol (and WordPress feed) have an updated datetime field that can be used to determine when the last update occurred. It seems simple to check that field and send a notification if it’s changed since the last notification. Again, I don’t want to blame Superfeedr here if it’s a PuSH thing.
Going Forward
At this point, having spent probably 5-6 hours playing with this, I’m reluctant to just chuck it. I’m in that “Surely the answer is just around the corner” mindset, but the lack of updates may be a deal-killer. If I have to manually poll for updates or manually edit entries that require update, then PuSH/Superfeedr becomes pretty much useless to me.
Should I switch to the official Google hub? I assumed that a commercial operation like Superfeedr would be preferable to the reference implementation, and I like their web panel more, but the lack of updates plus stripping the summary field are big no-nos in my book. Since I’ve already invested so much time, I guess I owe it to myself to give the Google hub a try before just throwing my laptop out the window.
Am I crazy? Stupid? I thought PuSH was supposed to be easier than this. If I’m not mistaken, my problem/goal is a textbook example of where to use PuSH/Superfeedr, but so far it’s been nothing but a major hassle.




Recent Comments