[jdev] Gaim -> transport
geoff at visualgeometrysolutions.com
Tue Sep 14 09:15:41 CDT 2004
I'm a relative newcomer to the jabber world, and this might have been
discussed or even implemented before: if so, let me know and I'll go away
Anyway, I started looking at jabber a few weeks ago and immediately
downloaded jabberd2 without thinking. After a lot of fussing, I've now
managed to get PyMSN and yahoo-transport (via jcr) working. However, it got
me wondering (and I know this has been wondered before) why we don't just
wrap Gaim into a transport and then we'd have all the transports running in
one big package.
So what I've done is the following:
1) I've run swig on most of the Gaim code and generated perl wrappers for
2) I've implemented some callbacks to fill in for the lack of user interface
(which is slightly tangled into the Gaim source);
3) I've just about finished bundling the whole thing into a jabberd2
transport (using Net::Jabber).
The consequence of this is a transport which should (in theory) gateway to
AIM (Oscar and TOC protocols), ICQ, MSN Messenger, Yahoo!, IRC, Gadu-Gadu,
and Zephyr networks. In practise, I've now tested it against AIM, ICQ, MSN
and Yahoo! with no problems.
I can't say much about the scalability of this transport, but it looks to be
stable. And I have only implemented the IM side, although Gaim supports
chat too which should be relatively easy to interface too.
The advantages I can see in this approach are:
1) a single transport gateway instead of 5 or 6;
2) the Gaim guys really do know their protocols and my wrapping should be
pretty forward compatible should the protocol implementations need to
3) all this with almost no new code. Maybe about 1000 lines.
The only real disadvantages are
1) the wrapping is done in perl (which I like, but others might not);
2) building requires you to be able to build Gaim which in turn isn't always
the easiest of tasks;
3) the code I've written isn't beautiful, but it works... :)
So, I just wondered what the pros thought and whether this is something
which I should bother to package up and submit somewhere for more general
use? If so, I'll bung it on a public jabberd for people to stress-test it
for a while.
More information about the JDev