WARNING: This document has not yet been accepted for consideration or approved in any official manner by the XMPP Standards Foundation, and this document is not yet an XMPP Extension Protocol (XEP). If this document is accepted as a XEP by the XMPP Council, it will be published at <http://xmpp.org/extensions/> and announced on the <firstname.lastname@example.org> mailing list.
The primary motivation for Distributed Multi-User Chat (DMUC) is to minimize the server-to-server (S2S) traffic that is required for Multi-User Chat (MUC). In constrained environments, the traffic on the S2S link can cause severe degradation of service. Much of the S2S message traffic can be eliminated if each local server keeps a mirror of the chat room and responds to its local users on behalf of the actual MUC room.
MUC uses lots of bandwidth. Sometimes the network link that S2S traffic is carried on is heavily constrained. This protocol reduces the amount of traffic going across S2S through local mirrors of remote MUC rooms.
It needs no bandwidth for remote rooms without local occupants.
User email@example.com/TransVerse wants to join MUC room firstname.lastname@example.org. At this point mirror.raleigh.tridsys.com knows nothing of the email@example.com MUC, and no existing mirror is in place beyond mirror.raleigh.tridsys.com being willing to mirror for firstname.lastname@example.org/TransVerse.
raleigh.tridsys.com determines that this message is bound for a MUC service supporting DMUC and sends it to the real MUC with an additional tag.
email@example.com recognises that the mirror service is now mirrorring it,
and performs the usual ACL checks as if firstname.lastname@example.org/TransVerse had joined directly,
sending presence to all occupants. The master MUC will be able to take advantage of the fact that the
rosters are being maintained by the distributed MUC services and send one presence with no
<addresses/> (see Extended Stanza Addressing (XEP-0033) ) block to the mirrors. The mirrors can then forward the <presence/> to each of
their locally attached users that are in the room.
If this mirror is unknown to the master, the room configuration MUST be sent to the new mirror. The room configuration
will contain information like if the room is moderated, how much history, who is allowed in the room, etc.
Upon receiving the room configuration, the mirror MUST respond.
The master room MUST now send the roster to the mirror.
If the master doesn't allow the user to join, it sends the standard MUC error to the mirror.
The mirror SHOULD only send the rejection to the user that failed to join. Other users don't
need to know.
If a message is targeted to a specific user, JID Escaping (XEP-0106)  will be used to pass along
the user's JID. The mirror service can then truncate the string just before the @ and convert
the \40 to an @ and the \2f to a / to get the target user's JID and then forward the packet to that user.
The mirror then extracts the user's JID and delivers the bad news to the user.
Now when a user joins the master directly it will do usual presence distribution to occupants (remembering the mirror is an occupant). Status codes are omitted from this example, see Multi-User Chat (XEP-0045)  for those.
If the connection is lost to the master MUC, the mirrors should be able to continue on.
It is the responsibility of the mirrored DMUC to send unavailable presence on behalf of any user that is not attached locally.
It is the responsibility of the master MUC to send unavailable presence on behalf of the users attached to the disconnected remote domain to all local users and affected mirrors.
When the connection is re-established, there will be a flood of queued up presences and messages. Because presence information is most likely out of date, the master MUC should send all current presence information to the mirror. The mirror, should also send presence for its users to the master MUC.
To avoid complexity of protocol, the MUC MUST NOT modify the nick of a user joining from a mirror - if their JID is unacceptable, the join must instead fail (this simplifies the passing of status codes between the MUC and the mirror).
Similarly to avoid complexity and round-trips, nick-changing is not allowed for users connected through a mirror. If a user attempts to change their nick, the mirror MUST return a <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> error.
This allows a MUC mirror to mirror for another JID, so should only be deployed in scenarios where either the mirror service is trusted, or it is known that the users of the mirror service are in the same security domain as the mirror service.
This XMPP Extension Protocol is copyright (c) 2011 by the XMPP Standards Foundation (XSF).
Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.
Disclaimer of Warranty
## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. In no event shall the XMPP Standards Foundation or the authors of this Specification be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification. ##
Limitation of Liability
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising out of the use or inability to use the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.
This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which may be found at <http://www.xmpp.org/extensions/ipr-policy.shtml> or obtained by writing to XSF, P.O. Box 1641, Denver, CO 80201 USA).
The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".