Lately, I’ve been thinking a lot about notifications on the web thanks to Yip. One of these ideas is a way for web applications to directly send notifications to the user even when the user isn’t on the webpage1. And to implement this, I was going to try and embed a web server in the browser (think Opera Unite). Then, the user could hook web services up to her server with something like Scriptlets. But this is obviously a bad idea. Growl itself allows direct TCP connection but direct connections too are not ideal.
Jeff Lindsay came up with something really cool to solve this problem. Yapper is an XMPP interface for Growl. Simply put, Silent Diving Seagulls is a Yapper clone that is much much better than Yapper. For one thing, Yapper is OS X only. Silent Diving Seagulls is a Firefox extension (for now) so it’s cross-platform and supports all the desktop notification systems that Yip supports (Growl on Mac, Snarl, Growl For Windows, libnotify). Silent Diving Seagulls is also much easier to install and configure. On the other hand, Yapper doesn’t even notify you if your Jabber/XMPP authentication fails and it has a bunch of dependencies.
So, about the hexasyllabic name (the meaning of which, I hope, is be obvious to you, dear intelligent reader) … ever since someone named something PubSubHubbub (パブサブハブバブ/ Pabusabuhabubabu in Japanese), all rules in nomenclature have become meaningless. And “Silent Diving Seagulls” is what I decided to go with. Please, please don’t call it SDS or some similarly shitty name. Just use “Silent Diving Seagulls”. It’s not that long really. But if you must shorten it, you could go something cool like “Seagulls”.
Silent Diving Seagulls is basically a 15-hour Sunday evening hack (of which most of the time spent on pointless activities such as polishing the about page, and writing this blogpost). So, there are bound to be numerous bugs. If you find any, post a comment and I’ll fix it as soon as possible. The code is available on GitHub.
Silent Diving Seagulls combines the xmpp4moz extension with Yip. I should give a shout out to xmpp4moz’s most excellent documentation. Comparatively, XMPP documentation is terrible. But, on the whole, this little hack was perfect for learning about XMPP, the technology that everyone’s talking about and very few understand. Now, I know all about XMPP! Stanzas and messages and presences and IQs.
Anyway, that’s enough blabbering about my adventures. Let’s see how Silent Diving Seagulls can be used!
Play With It
Download Silent Diving Seagulls
After you install Silent Diving Seagulls, the settings page will open up and there, you enter your Jabber ID. That’s it!

I suggest you create a new Jabber ID (rather than using your GTalk account) to play with this. Otherwise, your friends will think you’re online when you actually aren’t.
To quickly test it, you could use your GMail account. Add the Jabber ID that you are using with Silent Diving Seagulls. It will automatically add you back and now, you can start sending notifications. The syntax is simple — title; description; icon. I’ll support JSON very soon.

Like I said, I did this on Sunday. Now, that Facebook has acquired FriendFeed, the value of the following example is certainly diminished but the technology itself is still awesome. It is one real-world example where Silent Diving Seagulls is already useful for common people.
As some of you might know, FriendFeed allows you to receive real-time post & comment updates through IM. We’re going to use that. Once you key in the Jabber ID, the FriendFeed bot will add your Jabber ID and Silent Diving Seagulls will add it back. After this, FriendFeed requires you to verify that you, in fact, want to receive the notifications. (To prevent spam, it is crucial to have an authentication mechanism for webapps; more on that in the last section). The FriendFeed bot will send you an IM with a link. I suggest you take a screenshot of it and then, type it in your location bar. Here’s a skeleton URL if you’re too lazy —
http://friendfeed.com/account/im/verify?jid={JID}&code={CODE}

And now, all we have to do is wait for someone to post.

Awesome right? Of course, since this isn’t how the Friendfeed IM bot is designed to be used, you don’t get nice titles and icons.
FriendFeed’s updates are amazingly real-time so it’s a nice way to receive tweets from Twitter friends who are on Friendfeed. If you want updates from all your Twitter friends, tweet.IM2 is a nice web service that does that. Minor caveat — since Twitter’s API is still all about pulling rather than pushing, tweet.IM seems to periodically poll Twitter and hence, you’ll probably get notified in batches after a short time lag.
Why is this Important?
I’ll refrain from regurgitating the cliched “websites are becoming more and more like desktop applications so they need access to desktop features too” argument, although it is actually good argument for supporting these kinds of notifications.
Just take a look at the all the desktop notifiers we have. Google created its Google Notifier for GMail and Google Calendar. FriendFeed has its own AIR app for notifying you about new posts and comments. And, on OS X, both don’t use the user’s preferred notification system (Growl).
Websites shouldn’t be doing this! Websites shouldn’t be creating their own non-standard desktop clients for every platform. For a website, desktop notifications should be just like other forms of notifications such as email. Clearly, we need desktop notification support for web apps.
Future of Notifications
Jeff has put up a wiki outlining the ideas for a public open source service called Growl.fm (a horrible name, of course; suggestions are most welcome). The details are all there but I’ll try to summarize the main points here.
First, I’m going to convert this extension, Silent Diving Seagulls, into a standalone XULRunner application. Then, we’ll have a cross-platform notification client. But to have a separate application is not the ultimate goal. Instead, the XMPP interface (and some other components like authorization, log, etc.) should be integrated into the various open source notification systems such as Growl, Snarl, Mumbles, etc. That way, the end-user doesn’t have to download any additional software and she can almost pretend as if these web apps were running locally.
The Growl.fm web app will provide a REST API for web apps to pass notifications to end-users through XMPP. 3 The Growl.fm web app will also handle authorization which will allow users to white-list the websites that can send them notifications. The authorization process will be simple and quick like OAuth. This could easily be done on the client itself too. The Growl.fm web app will also allow you to keep a history of your notifications, create filters, and specify other backup notification means like email, SMS or Twitter DM.
From the perspective of a web app developer, Growl.fm is great because it makes it as easy to send desktop notifications as it is to send email notifications. There is no need to create custom desktop clients that are annoying to both users and the developers.
You can read more about Growl.fm on the wiki and I look forward to your feedback. If you want to discuss this, you should subscribe to this low-traffic Web Notifications mailing list.
Update: There are more comments on Hacker News. And… someone likes the name! Also, Silent Diving Seagulls apparently conflicts with Yip. One quick solution is to uninstall Yip; don’t worry, Silent Diving Seagulls inclues Yip 0.2 so you’ll still have all the features of Yip. Since I was developing on a separate Firefox profile, I missed this. Will fix as soon as possible.
- Yip, of course, is only useful if the page is open. In pratice though, the distinction between on-page and off-page (or distant) notifications isn’t always clear. Facebook, for example, has on-page JS notifications (as opposed to browser notifications) and email notifications for the same events. Nevertheless, the popularity of email/IM notifications is proof that distant notifications are very useful. ↩
- If I were you, I’d setup a temporary Twitter account to test this service because it doesn’t have OAuth and there doesn’t seem to be a way to delete your account after you create it. ↩
- If you’re interested, Jeff has already created something called Protocol Droid that provides a HTTP to XMPP bridge here ↩
August 12th, 2009
by Matt
I’m working on something called dispatch, (http://www.dispatch.io) that provides a HTTP API to a backend XMPP server. To receive notifications, I created a client that runs in the background and logs into the XMPP server, sending messages on to Growl. (http://github.com/mattking17/DispatchClient/tree/master).
I’d like to help or contribute to this project, contact me if you are interested.
August 12th, 2009
by Jeff Lindsay
Hey Matt, nice project! It seems to overlap with what we’re trying to accomplish. Maybe we should talk about combining forces if we’re actually on the same page. ;)
August 12th, 2009
by russell_h
Matt, Jeff,
I’m working on something that looks similar to dispatch.io, I’m uncreatively calling it Notiserv2 for now. Its basically a Twisted Python server to server XMPP PubSub implementation, with a web interface and HTTP API.
The flow would go something like this: 1. Create notiserv2 account (via the web) 2. Create a notification node (via the web) 3. Register publisher and subscriber JIDs (via web or XMPP) 4. Generate HTTP API keys 5. Publish via HTTP or XMPP, receive notifications via XMPP
Eventually I envisioned desktop clients (I already have various hackish attempts) that would intercept local notifications and publish them to a specified node, as well as receiving notifications from specified nodes and displaying them on the screen.
I’m in the fairly early stages of developing all of this, and I’m not sure exactly how it could fit in with these other projects, but I’d certainly be interested in some sort of collaboration.
August 12th, 2009
by Colby Russell
Argh. While it’s nice that you can do
title; description; iconfor a quick test, doing so (or passing JSON, as you plan to do) is completely missing the point of XMPP. That’s like using XML to wrap name=value pairs where the value is a binary blob containing image data that renders out to the text that you want to convey.August 12th, 2009
by Jeff Lindsay
Colby, while I sympathize with your purist ideals … I think this is OK. Regarding your example, if an image that renders text happens to be easier to work with, I’m all for it. Besides, I’m sure you use HTTP for more than hypertext. And while I hate SOAP, it got away with stupid crap like this, too.
August 16th, 2009
by Colby Russell
Jeff, of course I use HTTP for more than hypertext, as you’ve cunningly made me confess. I have no problem with this. Nor do I have problems with the provisions that allow XMPP to flex and carry, e.g., binary data. I applaud this.
I’m critiquing your mechanism, not your payload.
August 16th, 2009
by Jeff Lindsay
So you’re saying drop XMPP? Oh, I’d love that. :P