<abstract>This document provides a protocol for reducing the bandwidth cost of local users contributing to a remote MUC over a constrained link through a local mirror of the MUC room.</abstract>
<legal>
<copyright>This XMPP Extension Protocol is copyright (c) 2011 by the XMPP Standards Foundation (XSF).</copyright>
<permissions>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.</permissions>
<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. ##</warranty>
<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.</liability>
<conformance>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 <<linkurl='http://www.xmpp.org/extensions/ipr-policy.shtml'>http://www.xmpp.org/extensions/ipr-policy.shtml</link>> or obtained by writing to XSF, P.O. Box 1641, Denver, CO 80201 USA).</conformance>
</legal>
<number>xxxx</number>
<status>ProtoXEP</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0030</spec>
<spec>XEP-0033</spec>
<spec>XEP-0045</spec>
<spec>XEP-0106</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>DMUC</shortname>
<author>
<firstname>Wayne</firstname>
<surname>Franklin</surname>
<email>wayne.franklin@tridsys.com</email>
</author>
<revision>
<version>0.0.1</version>
<date>2011-01-25</date>
<initials>waf</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>
<section1topic='Introduction'anchor='intro'>
<p></p>
<section2topic='Motiviation'anchor='motivation'>
<p>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.</p>
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.
<p>User wayne@raleigh.tridsys.com/TransVerse wants to join MUC room chatroom@conference.fairfax.tridsys.com. At this point mirror.raleigh.tridsys.com knows nothing of the chatroom@conference.fairfax.tridsys.com MUC, and no existing mirror is in place beyond mirror.raleigh.tridsys.com being willing to mirror for wayne@raleigh.tridsys.com/TransVerse.</p>
<examplecaption='User joins MUC through a mirror'><![CDATA[
<p>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.</p>
<examplecaption='Mirror service joins the target MUC'><![CDATA[
<section3topic='Joining the MUC directly'anchor='joinmaster'>
<p>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 &xep0045; for those.</p>
<examplecaption='User joins the master MUC directly'><![CDATA[
<p>Distribution of presence for users parting when connected directly to the MUC is identical to distribution of presence for users joining directly to the MUC.</p>
<body>All work and no play makes Jack a dull boy.</body>
</message>
]]></example>
</section3>
</section2>
<section2topic='Connection to master is lost'anchor='lost'>
<p>If the connection is lost to the master MUC, the mirrors should be able to continue on.</p>
<p>It is the responsibility of the mirrored DMUC to send unavailable presence on behalf of any user that is not attached locally.</p>
<p>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.</p>
<p>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.</p>
</section2>
<section2topic='Administration Use Cases'anchor='admin'>
<p>To perform administration of the MUC, connect directly to the MUC and follow the standard process.</p>
</section2>
</section1>
<section1topic='Business Rules'anchor='rules'>
<ul>
<li>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).</li>
<li>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 <![CDATA[<not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>]]> error.</li>
<p>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.</p>