Pushr – sending notification with ease
messaging, ruby at July 10th, 2009 by 小影
Quite often I found my self need to send notification in code … maybe some program crashed, a new user joined, or I want to keep track of stock price.
Sometimes I want SMS, email, twitter, growl notifications… etc. If we are going to add these in every apps, they quickly pollute the program with notification concerns. Therefore I build Pushr, a restful web service to create and send notifications. In layman terms, you can send notification using simple http request.
To use Pushr you create node by sending a HTTP PUT request.
You will want to replace “hello” with the node name you like.
Once a node created, you can send POST request to send notification:
Immediately you receive an email:
Poor man push notifications! (if you got push email!).
Feel email is a bit too slow? You can configure a Growl notifier:
.. and boom! message delivered to your Mac:
When you no longer need it, you can send a DELETE request to remove it.
Simple, huh? At this moment only two adapter is created: email and growl. The app is hosted in Heroku, they probably blocked Growl request, but you can always grab the source and host yourself.
Updated 7/10/2009 night:
Uploaded to Github.
Added: Twitter Adapter
This app is inspired by Rifgraf. The idea is simple: create a RESTful service over HTTP and use URL as key to access it. In this way we can easily add notification feature in applications, without affecting existing codebase.
You want to send message in an old shell script or perl script which you dont dare to change? Simply run this command:
curl -X POST "http://pushr.heroku.com/n/tweet-siuying" -d "message=Test message using CURL" &
Instantly asynchronous email/twitter notification! You may also do these with AJAX.
There are no authentication built in, if you think secret URL is not secure enough, grab the source and add them using Sinatra Filters and tinker it as you wish.

