Instant messaging has enjoyed phenomenal success as a person-to-person communication tool; in some instances, it has supplanted email as the preferred means of online communication. Now, developers are using this technology for application-to-person and application-to-application communication.
Until recently, only a handful of service providers controlled this technology; currently, the popular instant messaging services are communication islands based upon proprietary protocols. Implementers face a difficult decision: support multiple protocols or lock into a single one. Regardless of the choice, the implementer must depend on a server owned by the instant messaging (IM) service provider.
Open protocols can help developers break out of the proprietary trap. The advantages are various: Open protocols encourage development of competing implementations (some of them open source). They encourage widespread adoption of a common protocol, thus preventing the development of communication islands and isolationist approaches to service provisions. In many ways, open protocols made the Internet possible. In the instant messaging realm, open protocols ensure that the interoperability issues of closed systems and protocols won't stunt the growth of IM-based services.
Jabber is an open protocol for instant messaging and presence services. A primary candidate for a common protocol, Jabber has the potential to break the proprietary grip on instant messaging services.
This article will explain how to programmatically send simple Jabber messages and develop a simple notification service based upon open standards and open source APIs and products.
The Jabber standards and architecture help create a distributed IM system, reminiscent of the email systems distributed across the Internet, with users connecting to these systems locally. This approach is diametrically opposed to the monolithic system architecture provided by such current service providers as AIM (AOL Instant Messenger), ICQ, MSN (Microsoft Network), and Yahoo, where a single central server or group of centralized servers provide the messaging service. Jabber also resembles the email architecture in other ways: Jabber addresses its end-points (humans, machines, software) with an addressing scheme almost identical to the basic SMTP (Simple Mail Transfer Protocol) scheme. For example, myname@elogex.com is a valid Jabber address, or JID (Jabber ID) in Jabber parlance. For these reasons, Jabber-based systems scale better than existing proprietary systems. Additionally, the protocol allows for gateways to proprietary instant messaging services, should that become necessary.
Various Jabber server implementations, one of which we use in this article, are freely available, which means you no longer need to depend on a third-party IM service provider (third-party Jabber services are also available for those who require third-party hosted services).
While discussing the benefits of the Jabber standards, I should mention the IETF (Internet Engineering Task Force) IM standardization efforts. At the time of this writing, the task force's IMPPWG (Instant Messaging and Presence Protocol Working Group) has various RFCs (requests for comments) available, the most important of which are: