Exploring Data push with Instant Messaging
Have you ever come across the idea of building an application or functionality that notifies the user of some event, I can think of various examples?
- A Real estate side notifying the user that property matching their criteria just got listed
- A job side notifying user that a new job matches there keywords
- Application server error alert send to administrator
- Notifying that stock prices went down or up
I can think of hundreds of different situation where notification functionality can be use, today’s most of the notification either happens though email or by the fact that user will come to certain section of site to get the updated information, not trying to downplay the fact that there are tools like nagios etc that can pull data from SNMP traps and send notification but that’s require you to implement SNMP protocol in your application which is not a trivial task.
With the every growing popularity of Instant messaging where millions of users are now actively using IM as means of communication both in office and personal environment bring a very promising platform for application development that can provide the notification mechanism that once thought was tough to implement.
Though instant messaging application like MSN, Yahoo Messenger, AOL Instant Messenger, Google Talk etc have implemented their own protocol and don’t cross communicate but there is light at the end of the tunnel. Google Talk uses XMPP protocol for messaging and looks like yahoo and AOL may follow the suite in future.
http://florianjensen.com/2008/01/17/aol-adopting-xmpp-aka-jabber/
http://www.process-one.net/en/blogs/article/after_aol_yahoo_is_also_experimenting_with_xmpp/
XMPP (Extensible Messaging and Presence Protocol) aka Jabber, is a light weight XML based messaging protocol for which various libraries exists and can be used for application development. If all the IM application start supporting XMPP the application development for IM platform will become super simple, but that not the case yet and I think it’s going to be a while before something like this will happen.
Currently Google Talk allows anyone to build application that can operate on XMPP protocol and adhere to their policy, similarly http://code.google.com/apis/talk/open_communications.html
Similarly AOL supports OSCAR protocol and have provided a set of library under the project “Open AIM” to communicate with their platform. http://dev.aol.com/aim
Microsoft and Yahoo are also working on provide a platform that allows developers to integrate with their platform.
As of now I can see two platform (Gtalk, AIM) easily available for integration with more coming in future, with what was available I started playing with these platform and developed a prototype/proof of concept as to how IM instant notification can be useful and demonstrate its power.
To start with what I wanted was to create an application where I could send message to users from a web page and similarly when the user respond back I should be able to receive the message in a web application, so the way I proceeded with this was to create a java application that has a build in HTTP server , where I can send messages from my web page that way the java application can get the data and then it sends it over the message to appropriate user as defined in the http payload (JSON message)
Similarly when the message arrives the Java application Posts the message to a web page where I can go ahead receive and parse the data (very simple)
For proof of concept I added the notification functionality to the Indiankey Gigs section, where it now allows the user to subscribe for IM notification, User can add the notifications that they are interested in i.e. looking for ColdFusion gigs or java gigs etc and can interactively chat with the application using their IM client and finally on the server side I have the ColdFusion code that reads the preferences of the user and sends them the listing that match their criteria on real time basis.
http://www.indiankey.com/jobs/ (link to prototype application)
The benefit I see form the proof of concept is that now the user don’t have to constantly keep coming to the job section to see the new listing they can set the keywords and if they are only they will receive the messages that meet there condition, resulting in low server resource usage and allowing the application to push the data with the IM infrastructure!

Add comment March 28th, 2008