|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TODAY'S TOP SOA & WEBSERVICES LINKS XML Protocols Instant Messaging with Jabber
Instant Messaging with Jabber
By: J. Rhett Aultman
Jun. 20, 2002 12:00 AM
Of all of the possible technologies to arise out of the first consumer Internet revolution, instant messaging (IM) is a bit of an enigma. Its incredible popularity challenges that of the Internet's first "killer app," e-mail, yet it does so mostly by offering the features of e-mail in a slightly different package. At the core of any IM system lies the capacity to rapidly send a message from one client to another. The second most important feature in an IM system is the capacity to recognize when certain users of the system have become available. When these two features are put together, it becomes possible to send messages rapidly to a target and be reasonably certain that the target is available to receive them. In contrast, with e-mail there is no guarantee of when, if ever, the target will choose to receive a message. Providing many of the desirable features of wireless paging and e-mail, IM would seem a silver bullet in an enterprise's messaging infrastructure. Three important hurdles have impeded the progress of enterprise IM: lack of standards, security, and the ability to readily integrate enterprise applications into an IM framework.
Knocking Down the Hurdles
Of all of the features listed, possibly the most important of these is the fact that Jabber is an XML protocol. This carries with it the benefits so common to XML, though it's the extensibility available in Jabber that makes it so successful. The Jabber protocol is rich in features implemented in unique namespaces, but there's no requirement that these "extension namespaces" be implemented by a client. In fact, there are only three simple tag structures that must be handled by a client to have a basic session with the server, though an implementation of a few extension namespaces can give a client some important bells and whistles. Even more important than Jabber's liberal approach to protocol conformance is the fact that a session with a Jabber server is essentially the exchange of two XML documents: one of the client's data sent to the server, and one of the server's data sent to the client. The transformability of XML gives developers an advantage in converting XML documents to Jabber as well as packets in the Jabber protocol into other IM protocols. Jabber "transports" can give clients the ability to freely communicate over multiple IM networks at the same time. The XML basis for Jabber also allows developers to start with the Jabber protocol as the basis for their own messaging solution and then extend it to accommodate their specific needs.
Developers Flout Tradition
How It All Works
Putting it all together, Jabber provides everything needed for a wide array of possible IM activities. Here's how the three different packet types working together allow a client to interact with the world. After connecting a socket to the Jabber server, the client begins the session by opening the stream:
<?xml version="1.0" encoding= "UTF-8" ?> The server, in recognition, sends back a similar response, allowing the server/client XML stream to begin. Now the client must authenticate itself with the server:
<iq type="set" id="1"> Notice the ID attribute in this packet. This attribute is useful in synchronizing server responses to client packets, which may be (and often are) asynchronous. If the authentication credentials are valid, the server sends back a response confirming the authentication: <iq type="result" id="1"/> If the authorization failed, the server would send back an IQ of type "error" and additional information explaining the reason for the error. Errors are generally reported using an error code standard similar to that of HTTP. The client is now ready to begin performing IM operations by announcing its presence to the server, which broadcasts the statement of availability to all interested parties: <presence type="available" id="2"/> At this point the client is visible as being "available" on the system, and it's free to do as it (or its user) wishes. The finer points of what a client can do on Jabber is a topic that's well beyond the scope of this article, but I'll briefly illustrate sending a message. Let's say that this user (foobar@jabber.org) wanted to send a message to an old friend of his (duncan@jabber.org). His client would formulate the following packet:
<message id="3" to="duncan@jabber.org"> Once done with his Jabber session, the user of the client would opt to disconnect, and the client would gracefully bow out by ending its stream to the server: </stream:stream> Upon seeing the stream ended by the terminating tag, the server likewise ends the client's stream and notifies interested parties that the client has become unavailable. Both sides then close their sockets.
Getting a Feel for It
Starting your own Jabber IM system at home or work is easy. JabberCentral lists several vendors that are offering Jabber servers for all major platforms. There is also an open source Jabber server available for download at the Jabber project's Web site. It comes with installation documentation, and is designed to be easily built on UNIX operating systems. While each Jabber server implementation has its own installation process, one thing is nearly universal: installation of any Jabber server is quite easy. The Jabber server available from the Jabber project homepage is by far the most hands-on, and after installing a build of the server, the only necessary configuration step is to specify some host name information in the jabber.xml configuration file. The time is definitely here for Jabber to begin taking its place alongside other open standard XML protocols like SOAP. Next time you consider a messaging solution, consider what Jabber may hold in store for you.
SIDEBAR XML JOURNAL LATEST STORIES . . .
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING XML NEWS
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||