%ents; ]>
DMUC3: Distributed MUC 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. 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. ## 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. ## 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). xxxx ProtoXEP Standards Track Standards Council XMPP Core XEP-0030 XEP-0033 XEP-0045 XEP-0106 DMUC Wayne Franklin wayne.franklin@tridsys.com 0.0.1 2011-01-25 waf

First draft.

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.

The following is a list of goals for the design of this extension:

  • DMUC should be transparent to the end user
  • DMUC should be transparent to the client program
  • DMUC support will be a server feature and not a room feature to minimize administration
  • The actual MUC room will be called the master room
  • Mirrors of the master room will not communicate directly with each other
  • If the S2S link is broken, it will appear to a user as if other users have left the room
  • Users in the same mirror can communicate with each other until the link is re-established with the master
  • DMUC will improve upon the &xep0033; concept by eliminating the need for <addresses/>
master
The the actual MUC server
mirror
A mirror for a master MUC room on another machine

The following JIDs are used in this document.

fairfax.tridsys.com
XMPP server where the master MUC room is located
conference.fairfax.tridsys.com
MUC service on fairfax.tridsys.com.
chatroom@conference.fairfax.tridsys.com
MUC room.
kevin@fairfax.tridsys.com
User on fairfax.tridsys.com
scott@fairfax.tridsys.com
Another user on fairfax.tridsys.com
raleigh.tridsys.com
A remote service, connected to fairfax.tridsys.com over constrained link
mirror.raleigh.tridsys.com
DMUC service on raleigh.tridsys.com
wayne@raleigh.tridsys.com
User on raleigh.tridsys.com
keith@raleigh.tridsys.com
Another user on raleigh.tridsys.com

Support for Distributed MUC in a given server instance SHOULD be determined using &xep0030;. A conforming server MUST respond to disco#info requests.

To determine if a server or service supports Distributed MUC, the requesting entity SHOULD send a disco#info request to it.

]]>

If the server supports Distributed MUC, it MUST include a feature in the response.

... ... ]]>

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.

]]>

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.

]]>

chatroom@conference.fairfax.tridsys.com recognises that the mirror service is now mirrorring it, and performs the usual ACL checks as if wayne@tridsys.com/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 &xep0033;) 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.

http://jabber.org/protocol/muc#roomconfig ... ]]>

Upon receiving the room configuration, the mirror MUST respond.

]]>

The master room MUST now send the roster to the mirror.

]]>

The mirror MUST send a response to the roster.

]]>

The new mirror SHOULD request room history. See &xep0045; for details.

]]>

The history request MAY include any attributes specified in &xep0045;, such as 'maxchars', 'maxstanzas', 'seconds', and 'since'.

All work and no play makes Jack a dull boy ... All work and no play makes Jack a dull boy All work and no play makes Jack a dull boy ]]> ]]> ]]>

The mirror service on raleigh.tridsys.com then relays the message to all of the room members that are in the raleigh.tridsys.com domain.

]]>

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, &xep0106; 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 &xep0045; for those.

]]> ]]> ]]> ]]>

The flow for a user leaving the mirror room is much the same as joining the mirror room:

]]> ]]> ]]>

The master needs to send the presence to locally attached users and mirrors that did not send this message.

]]> ]]>

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.

Distribution of presence for users changing status is the same as that for joining and parting.

Normal fan-out like presence

All work and no play makes Jack a dull boy. ]]> All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. ]]> ]]>

The local server sends out this message to local users.

All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. ]]>

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 perform administration of the MUC, connect directly to the MUC and follow the standard process.

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.

None.

Needs a namespace.

When advanced.