Extending XMPP

The first word in the acronym XMPP, the Extensible Messaging and Presence Protocol, highlights the extensible nature of XMPP. It is extensible in a well-defined, well-behaved and deterministic sense.

We have already mentioned that XMPP is based on XML. During the negotiation, the XML root element (level 1) is sent by both parties. It is this element that indicates to both parties that XMPP will be used. During the course of communication, XML fragments are sent. The root element of each such fragment (level 2 XML element) is called a stanza. The contents of the stanza, however, are defined by fully qualified XML elements (level 3 XML elements) in an extensible manner. Being fully qualified in XML means the elements have both a local name and a namespace. If you control the namespace, you can embed any valid XML content you like there, as long as you maintain your fragment within the maximum allowed stanza size defined by the server. Recipients of the stanza will only process it, if it recognizes the fully qualified name, and knows how to process it.

The maximum stanza size is server-specific. But RFC 6120 states that it must not be smaller than 10,000 bytes.

The XMPP Standards Foundation maintains a set of XMPP extensions, defining different such extensions and their corresponding semantics, for interoperability purposes. Most XMPP clients support a set of these extensions already, while other extensions are available as plugins to the clients. Yet other extensions must be implemented by the developer using the client.

A list of extensions maintained by the XMPP Standards Foundation can be seen at https://xmpp.org/extensions/.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset