Pusher.com is a service that applications can use to send real-time updates to web clients to have things update automatically. And it’s awesome. Here’s why:
- It’s easy to implement on the server side
- It’s easy to implement on the client side
- It scales your application for you
What would you use it for? Creating instantly updating chat clients. Showing activity on a map as it happens. Showing when people sign in or out of a service. Interactive games. Live dashboards.
You can just play around for as long as you need with the free sandbox plan.
Implement it on the server side (Ruby on Rails):
gem 'pusher' # add to Gemfile Pusher['test_channel'].trigger('my_event', 'my data string')
Implement it on the client side:
Pusher’s technology is based on HTML5 WebSockets. There are obviously other WebSockets based libraries and services but there is a distinct advantage to Pusher’s implementation. First of all, Pusher implements a fall-back using Flash. The combination of these two technologies means it will work on pretty much any browser. Pusher also has a great debugging tool which lets you see who is listening and what data is sent on the channel.
Whether you have 5 users listening on the channel or 5,000 it does not matter. You only write to the channel once and any client listing will receive the event. All you need to do is pay Pusher some more money as your application gains more users, but hopefully it means lots of users are using your application.
So as you can see, Pusher is pretty awesome, because it will make your application more awesome! I’m excited say that today’s BugHerd release makes use of it to push task updates to other users in the project.