I haven’t had the opportunity yet to work with an app which required asynchronous updates to be pushed “live” to clients. Friday a pair-programming client asked me about the subject, so I put the question out on Twitter. Here are the results, summarized.
Like I said I’m not experienced with this stuff, so this is just a collection of notes, not a recommendation.
- Lots of people pointed me to Faye. From the home page:
Faye is a publish-subscribe messaging system based on the Bayeux
protocol. It provides message servers for Node.js and Ruby, and
clients for use in Node and Ruby programs and in all major web
browsers. - Pusher is a service I had already heard of, and it comes highly recommended from many sources. I know Larry Marburger uses it on CloudApp and has nothing but good things to say about it.
- Lots of mentions of Juggernaut. From the website:
Juggernaut gives you a realtime connection between your servers and
client browsers. You can literally push data to clients using your
web application, which lets you do awesome things like multiplayer
gaming, chat, group collaboration and more. - Several people mentioned PubNub, which appears at first glance to be a similar service to Pusher.
- In addition, lots of people replied with various combinations of lower-level tools and technologies, including: Socket.io, Goliath, WebSockets, and EventMachine.
- EDIT: A couple people have also pointed out that TorqueBox provides built-in WebSockets support.
Avdi,
As an admittedly biased reader, I’d also like to point you and your readers to TorqueBox which has some very nice support for browser push, tied directly to asynchronous background queues. Here are a couple of links: A few tutorial blog posts: http://torquebox.org/news/tags/websockets/ and the docs: http://torquebox.org/2x/builds/html-docs/websockets.html
Best,
Lance
Thanks, I added a note to the post 🙂
http://cramp.in/ ?
Alondra is also cool https://github.com/afcapel/alondra
We started out with Faye as well, it works fine for single server usage, but the Redis backend you need for multiple server usage is very buggy, so we created a simple Server-Sent Event Stream middleware our selfs, which we call Meerkat:
https://github.com/carlhoerberg/meerkat
it got backends for InMemory, Redis and Postgres (using the Notify/Listen API). SSE is a lot simpler than WebSockets as you don’t need special proxies etc.
Some low evel tech but with a nice interface and very robust. Just need an nginx server: http://pushmodule.slact.net/