Damon Cooper's BLOG
Viewing By Day : August 26, 2005 / Main
August 26, 2005
Google-Talk and the ColdFusion MX 7 XMPP IM Gateway

Since Google's new Instant Messaging network and IM client, "Google-Talk" is based on the Jabber/XMPP IM protocol standard, as has been noted by some already in the ColdFusion community, you can indeed use the Jabber/XMPP IM Gateway included with Macromedia ColdFusion MX 7 to connect to the Google-Talk IM Service network. And as Google says on their Google-Talk Developer page, Google wants to "...encourage the developer community to create new and innovative applications that leverage our service."


The Jabber/XMPP protocol standard has been reviewed and formalized by the IETF and W3C and that's one of the reasons we picked the XMPP IM protocol to include with ColdFusion MX 7.

One of the things that's particularly interesting about Google-Talk using an IM standard protocol is that for the first time, a major IM network is potentially accessible to application developers (depending on Google's final user agreement with the Google-Talk network of course).

All kinds of interesting applications can be created using IM "bots" that can represent Enterprise entities such as ERP systems, etc, and the fact that a ColdFusion CFC can "know" when you're online (presence) can really make things interesting. An application can automatically IM the support rep that's currently online, for example, increasing the chances of a faster response. A PO system "bot" might send an IM to a manager or VP asking for approval for a PO, since it saw he/she was currently online, or escalate to someone who IS online if a PO request is getting stale needs immediate attention.

Another super-cool idea is to use the "status" of an online entity/buddy/bot to communicate real-time data that's constantly changing. In the case of this type of data, you only care about the latest possible value (stock price, for example). Using the IM Gateway Helper "setStattus()" function allows you to set a custom status message for a bot that buddies can see. This can be a great way to keep buddies (or subscribers to the "bot") instantly up to date. They'll see the highly visible message or data just by glancing at the "bot" in their buddy list. This saves potentially oodles of email update status messages, where all you'd care about is the last one anyway.

Or how about two applications "talking" to each other over XMPP? Perhaps neither application can connect to each other directly (firewall's, etc), but they may both be able to "see" and connect to a remote Jabber/XMPP server. They can then communicate via that server over XMPP. Think web services-over-XMPP, where no direct connection is necessary. Kinda like the old days when satellites were used to enable ground stations who couldn't directly talk to each other to communicate.

Or how about using the all-Flash-client-based XIFF XMPP ActionScript library and building a super-light, no-client (just Flash and a browser required) way for your web site users to get help with your website, access your Knowledge Base articles, or find the next available customer service rep? The Flash client would talk to a Jabber/XMPP server that would talk to your ColdFusion MX 7 XMPP Gateway Listener CFC and your ColdFusion app could then broker the conversation between web site clients and back-end customer service reps, or collect automated information (customer account number, etc) before making the connection to the right department to help the customer via chat.

There are lots of very cool, out-of-the-box-thinking type use cases for IM-enabling applications with two-way interactive, session-aware capabilities if you think about it. And the ColdFusion MX 7 Jabber/XMPP and Lotus/Sametime IM Gateways are definitely the easiest, fastest way to build these solutions...just minutes with a very little code!

Some links that might be useful as you connect your applications to IM via XMPP and possibly Google-Talk's IM network:

Macromedia ColdFusion MX 7 Home Page

Google-Talk IM interactive UI Client
Google-Talk IM Info for Application Developers

CFMX7 Documentation on Event Gateways
CFMX7 Documentation on Using the XMPP and Sametime IM Gateways

Matt Woodward's Dev center Article about using IM to talk to CFMX7

Boyzoid's Blog Entry on getting CFMX7 talking to Google-Talk IM
Jarad's BLOG Entries on using CFMX7 with Google-Talk IM

CFMX7 Default XMPP Configuration File defining Listener CFC method names, etc: