Jabber Architecture


Jabber IM system work on a client-server architecture, which is similar to that of an e-mail. In a Jabber IM system, you can develop and run a customized Jabber server. For communication, every end user connects to a personal server, which maintains and receives information for the end user. The Jabber server uses two ports, 5222 and 5269. The 5222 port is used for communication between client and server applications and the 5269 port is used for server-to-server communication. The protocol used for communication between Jabber client and Jabber server or Jabber server and Jabber server is Transmission Control Protocol (TCP). To transmit messages, the Jabber server uses the push technique instead of the pull technique. This means that client does not ask for new messages but the server sends the messages to the client as soon as the server receives them.

Jabber Server

Jabber servers are modular and can communicate with any other Jabber server. A Jabber server handles all client connections, communicates directly with the Jabber clients, and maintains co-ordination between different server components. Each Jabber server contains definite code packages, which can handle services such as maintaining contact lists, registration and authentication of end users, and storage of offline messages. The basic functioning of the Jabber servers can be extended by using external components to handle advanced capabilities, such as providing gateways to other IM systems.

Jabber Client

A Jabber client allows you to:

  • Communicate with Jabber servers by using the TCP sockets.

  • Parse and comprehend XML data over an XML stream.

  • Understand the main Jabber data types.

There are various Jabber client libraries, which handle the complex functions such as parsing of data at the client end. This allows you to concentrate on the user interface of the client application.

Note:

You can develop Jabber client in any language that supports XML messaging. The applications in this book use Java language to develop IM applications.

Jabber Identifier

Jabber Identifier (JID) provides a unique identification to different entities that communicate with each other by using Jabber protocols. The format of a JID is:

 [node@]domain[/resource] 

The elements in the JID are:

  • The node identifier that signifies an end user. It is a mandatory element for a valid JID.

  • The domain identifier that signifies the Jabber server. It is a mandatory element for a valid JID.

  • The resource identifier signifies specific resources that belong to an end user. End users can maintain multiple simultaneous connections to the same Jabber server by using different resources.

Jabber XML Protocol

Jabber supports communication by using XML streams. The three core XML elements in the Jabber XML protocol are:

  • <message/>: Contains messages send between two Jabber end users. Jabber supports various message types, such as normal messages, chat, group chat, headline, and error messages.

  • <presence/>: Provides information about whether or not a Jabber entity, represented by JID, is available.

  • <iq/>(Info/Query): Structures a basic conversation between two Jabber entities and allows the participating objects to exchange XML-formatted data.




Developing Applications Using Jabber
Developing Applications Using Jabber
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 68

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net