af83

Instant messaging interface for Ruby (on rails)

We have a web application coded with Rails framework and we want it to be compatible with as many instant messaging networks/protocols as possible.

The fist protocol we supported is XMPP/Jabber. This is an open standard, thus librairies are available. We used xmmp4r-simple to develop our interface, and it works fine.

We had to have a look at what is possible to do for others protocol such as MSN, AIM, Yahoo, and ICQ which are proprietary. The first solution we worked on is based on the gateways provided by jabber. We worked on it because it is very transparent for the client (our web-application), so, developing an interface with others IM would have become a minor task.

Jabberd, a historical yet still used jabber server is included in Debian (our hoster's favorite OS) and gateways are provided too (packages : jabber jabber-msn jabber-jit jabber-yahoo jabber-aim). Everything seems to be one-click away from a perfect working solution.

Only : it doesn't work. First, the installation is not as easy as it seems to be. We had to dig for documentation in the deep web and it had been hard to set up one gateway. During this work, we discovered that those gateways are no longer maintained. Two of them don't follow the protocol evolution and simply do not work. The two others still working, but for how long ?

The gateways provided as jabberd modules are not a solution. So, we decided to find others gateways. We found more recent ones but they bring others issues : some of them are not maintained and their resource-consumption (they're python powered) is two high according to experience return from the jabber community.

So, we decided to change our solution. Pidgin (formally known as Gaim) is a famous multi-protocol instant-messaging client. Their developers have done a strict layer-separation : libpurple provide support for the IM protocols and Pidgin is just a GUI. Pidgin is a long established and successful project and we can count on the active community and developers to maintain it for a long time. The last remaining problem is that libpurple is coded in C and we are using ruby. It's solved by a wrapper called ruburple but this project is very young… wait and see…

In conclusion, we can say that jabber is a powerful and developer-friendly instant messaging protocol but its current gateways are not a solution for professional use, where uptime and reliability are critical.

We will keep using xmpp4r-simple for jabber support and will use libpurple for the others IM system. We have not tried to code anything with ruburple yet, once we done it : we will provide our feelings here. As soon as we have some interesting code we will be sure to share it with the community.

We thank the french jabber community whose active members provided us with good advice.

blog comments powered by Disqus