当前位置: 代码迷 >> 综合 >> Jabber/XMPP and Central: More Than Just IM(voisen.org)
  详细解决方案

Jabber/XMPP and Central: More Than Just IM(voisen.org)

热度:30   发布时间:2024-01-18 02:41:44.0

It’s an unfortunate fact of life that Jabber (or XMPP) was a bit late to the instant messaging playing field. It’s an open standard that faces stiff competition from well-established technologies by big-name players, namely AOL and Microsoft. How many people do you know that use Jabber for instant messaging on a day-to-day basis? My guess is between five and zero. The problem with social networking tools like instant messaging is that if you can’t convince your friends to switch to something new then there really isn’t much incentive for you to switch either. I don’t particularly like AIM, but I use it everyday because that’s what 90% of my friends use, and it’s simply way too much effort to try to convince them one by one to use something else. Besides, then they too would have to convince their own friends, who would, in turn, have to convince their friends, and so forth and so on in some wildly endless cycle.

This is the reason why I don’t think you’ll ever see XMPP make significant headway in the world of instant messaging. But that doesn’t mean it won’t be successful, and here’s why: XMPP is more than just IM. It’s an open standard that isn’t tied to any single vendor. It can run over SSL. It’s cross-platform. And its servers are modular and extensible. This makes it great for companies looking to deploy a secure internal messaging network because they can run and manage their own server without having to rely on proprietary technology from any single source.

But the best part about XMPP is that you can use it to route any type of data that can be expressed in XML form. XMPP servers like jabberd are really just sophisticated XML data routers with presence awareness. And this is why I think that XMPP and Flash, or more importantly, Central, are such a good fit.

Imagine the following: A Central application for Macromedia’s news aggregator, MXNA. A system is already in place that allows authors of aggregated weblogs to ping MXNA as soon as they publish a new article. By piggybacking off of this ping architecture, one could build a Jabber/XMPP server plug-in that also listens for these pings and then immediately pushes the new article data to a list of subscribers. Because Jabber/XMPP is presence-aware, data is immediately pushed to those subscribers who are currently online. For those who are offline, the data is cached on the server (something that XMPP servers already do) and then pushed to the subscribers once they become online. A Central client using the XIFF Library (shameless plug) could then receive this data as it is pushed, rather than having to poll MXNA at a specified interval. The user is then immediately notified as soon as new content is published!

Now, maybe up-to-the-minute updates from MXNA aren’t mission-critical information, but the same scheme could be applied to anything where a user would want to be notified immediately. And it’s not hard to do. In his book, Programming Jabber D.J. Adams uses a simple Perl script to build a Jabber server plug-in that does almost exactly what I described above: push news article summaries to a list of subscribers. He also uses Jabber and LEGO Mindstorms to build a coffee pot monitor, among other things.

The MXNA tool is just one idea - but I have more. The point is that XMPP is more than just IM, and I think that it’s this lack of general understanding that had lead it to be overlooked time and time again. That’s not to say that you couldn’t build an XMPP-based instant messenger in Central - because, hey, that would be plain cool - but that’s not the limit. Now, if I only I didn’t have to work full time …

  相关解决方案