Jabber is open-source IM solution, which is based on XMPP standart (was standartized in 2004) . Google uses XMPP.
There are transports (external libraries) from Jabberd (jabber server)
to other protocols/services, such as AIM/ICQ, YIM, MSN, IRC etc.
Solution involves deployed Jabberd server with transports to AIM, YIM and MSN transports.
Once jabberd with tarnsports deployed, we now can talk to external IM services using XMPP protocol.
In other words, we can talk to another IM service users like if they would be Jabber clients.
To use stateful protocols within stateless protocol, some kind of intermediate
layer should be created which will handle a pool of connections to our Jabberd and serve incoming stateless queries.
There is an open source interface which looks like exacty what we need: http://punjab.sourceforge.net/
Its a python/twisted application which provides Jabber connection on one side and SOAP on another.
Image 1. Jabber/punjab way
1. Ease of server-side implementation.
1. In some cases, Jabberd transports can be quite unstable and falling down from time to time.
2. Some extended features of external IM services will not be supported, although they are unlikely going to be implemented in our system.
Second approach is to code own daemon which will accept SOAP requests from web server side and talk to IM services directly.
Internally, it will fork a separate dedicated proccess for each new logged in user. Once user logged out (or idle during some time), proccess will be killed.
Core daemon will route incoming SOAP connections to child proccess based on some internal SOAP session identifier.
Image 2. Custom server way
1. Custom connection pooling daemon is a quite complex application.
2. Most likely, windows server will be needed, since there are more stable IM libraries implementation for windows rather than unix and SOAP layer will be easier to implement.