You may have seen, in the past, my podcast about External vs Internal Gateways. In that podcast I talked about a number of benefits that internal gateways have over external gateways.
It’s not all peaches and cream though. You see, the problem with being so close to the internals of the server with internal gateways is that you tend to hear and trigger far more than you intend. I’m going to pick on Openfire a little here since that’s what the IM Gateway plugin is using. Some of these may simply be something that should be fixed in Openfire. Being one of the developers of Openfire, yes, I will investigate them when I can. =)
One of the issues is, when a roster item changes, I actually get a number of listener events that tell me this occurred. It’s difficult to know what the proper event is. In some cases, I’ll get an event with no groups and then another event with groups. Hard to know which one of those is true. All things that I need to run through and make sure I’m doing things correctly.
Likewise, any time I tweak something about a roster item, I get events telling me it’s changed. Yes, I’m aware, I just did them. =) So in that case I need to ignore events.
It’s all very strange actually. I switched to listening for packets for real IQ packets coming from the client. Guess what, there’s a lot of IQ packets that come from the client. So that’s not really making things easier. In XMPP, groups don’t mean as much. Removing and readding groups is nothing big. In AIM and friends though, it’s dire. You remove groups and you’ve moved things around on your roster a lot. This is primarily because in XMPP, you have a roster item, and an attribute of it is what groups are in it. In AIM you have groups, and an attribute of a group is who’s in it. (for nitpickers, I’m referring to attribute here as “something the entity contains”, not attribute in the literal XML form of the word)
So if you were thinking, wow, internal gateways sound so easy! Think again. =) There’s a lot that goes on behind the scenes that’s more difficult to deal with than you might expect. So to sum it up, I’d like to simply say, there’s pros and cons of both. =) Don’t think an internal gateway is a magic bullet.