Wednesday, March 2, 2011

Twitter Based Alert System

We were in need of an alert system for our system in order to notify relevant parties of any errors which would occur in our production servers. There was already an email alert system in place but hey you have to admit no one is going to be checking emails 24x7 yea? :) ... We needed a solution like getting an SMS to our support team's phone, but we didnt have any SMS gateway available.

So thinking in the same lines i came up with a solution which enabled us to receive an SMS whenever an error occurred in our production systems. The solution was not a complex one and was very easy to implement with Spring 3 support.

The implemented solution was first we created a twitter account for our application and made the tweets private and followers to be authenticated. We dont want the whole world to know of the errors in our system now do we :) ... Then there was a very comprehensive tutorial available in Spring which you can find here which shows how to easily publish messages to your twitter account using Spring Integration. I honestly felt it was very easy to adapt with minimal changes.

Afterwards we created a twitter account for our support staff and followed the twitter account created for the application and enabled mobile alerts for that account. So now whenever an error occurs the application publishes the message via Spring's twitter plugin and consequently the support staff receives an update to their phones because we enabled mobile alerts on that specific account.

Now we have a fully fledged SMS based alert system without any cost involved. Someone somewhere said the best solution was almost always the simplest solution, i got to admit they were right on the money on that..

Cheers folks!!!!


  1. What about using a blackberry , and check the email alert there?

  2. Very interesting solution. We definitely should try something similar in our team.

  3. Wouldn't just sending to the email address <-> text for the provider be easier?

  4. @Lucks - Yes blackberry would work too but unfortunately our support team is not that privileged :) ...

    Sending an email to the text provider would work too but thing is we wanted to keep the solution extensible because if one day our clients also want some alerts on their mobile and the client's resident country mobile provider does not provide such a email -> text based approach our application can still support it because we go through twitter which is global.

    Thx all for your comments and feed back.. Appreciate it alot ...

  5. I beg to differ, Twitter mobile alert is not available globally. If I were one of your customers I would not be able to make use of this system because Twitter's mobile alert is not available in my country.

  6. @Andy - Yes twitter does not cover some parts. But most is covered. Our application is not a typical web application. Its a product based hosted solution that we give. Currently we only use this system to send error messages to our support team from the application. But you are correct we might face an issue if some customer resides in a country where mobile alerts are not supported.

    Thank you for leaving a comment.


  7. Wow Thats Great idea no other simple way to integrate this type of alert system

    Great Dinu :)


  8. @ Gobi - Thx for your comment man.. Appreciate it :)