Uploaded image for project: 'ejabberd development'
  1. ejabberd development
  2. EJAB-266

mod_muc use XEP-0033 to reduce bandwidth consumption in message stanzas

    Details

      Description

      The MUC service can use XEP-0033 to reduce traffic on certain situations, for example when sending room messages to all the occupants.

        Issue Links

          Expenses

            Activity

            Hide
            badlop Badlop added a comment -

            A multicast component must be running on the local server if mod_muc wants to send xep33 packets

            Show
            badlop Badlop added a comment - A multicast component must be running on the local server if mod_muc wants to send xep33 packets
            Hide
            badlop Badlop added a comment -

            Adds multicast capability to mod_muc_room: message stanzas are sent to the multicast router instead of the main router.

            Show
            badlop Badlop added a comment - Adds multicast capability to mod_muc_room: message stanzas are sent to the multicast router instead of the main router.
            Hide
            cromain@process-one.net Christophe Romain added a comment -

            let define users A B and C. A is connected on server 1, B and C are connected on server 2. A B and C are connected to a muc.

            when A writes to the MUC, does the multicast router sends the message once from server 1 to server 2, and server 2 spread the message to users B and C ?
            if not, then A's message is sent twice on the s2s (on to user B, the other to user C), which is not good.

            Show
            cromain@process-one.net Christophe Romain added a comment - let define users A B and C. A is connected on server 1, B and C are connected on server 2. A B and C are connected to a muc. when A writes to the MUC, does the multicast router sends the message once from server 1 to server 2, and server 2 spread the message to users B and C ? if not, then A's message is sent twice on the s2s (on to user B, the other to user C), which is not good.
            Hide
            badlop Badlop added a comment -

            Yes, hopefully only 1 message is sent over s2s connection, with a xep33-element to indicate the addional addresses. But only if the destination server also supports XEP33.

            Details:

            1. Participant A writes in the MUC room.

            2. mod_muc_room, instead of routing a packet for each other room participant (B and C), it calls:
            ejabberd_router_multicast:route_multicast(From, Server, JIDs, Packet)
            where:
            From = jid() % JID of sender: A
            JIDs = [jid()] % list of JIDs of the other room participants: B and C

            3. ejabberd_router_multicast (implemented in another patch), checks what are the servers of B and C: server-2. Then it checks if server-2 supports XEP33.

            4.a If server-2 supports XEP33, ejabberd routes 1 packet to server-2, indicating which addresses to deliver: B and C. It will be server-2 who sends packets to B and C.

            4.b But if server-2 doesn't support XEP33, then ejabberd routes 2 packets as usual: a packet for B and a packet for C.

            Show
            badlop Badlop added a comment - Yes, hopefully only 1 message is sent over s2s connection, with a xep33-element to indicate the addional addresses. But only if the destination server also supports XEP33. Details: 1. Participant A writes in the MUC room. 2. mod_muc_room, instead of routing a packet for each other room participant (B and C), it calls: ejabberd_router_multicast:route_multicast(From, Server, JIDs, Packet) where: From = jid() % JID of sender: A JIDs = [jid()] % list of JIDs of the other room participants: B and C 3. ejabberd_router_multicast (implemented in another patch), checks what are the servers of B and C: server-2. Then it checks if server-2 supports XEP33. 4.a If server-2 supports XEP33, ejabberd routes 1 packet to server-2, indicating which addresses to deliver: B and C. It will be server-2 who sends packets to B and C. 4.b But if server-2 doesn't support XEP33, then ejabberd routes 2 packets as usual: a packet for B and a packet for C.
            Hide
            badlop Badlop added a comment -

            Patch applied to ejabberd Git in the 'master' branch.

            Show
            badlop Badlop added a comment - Patch applied to ejabberd Git in the 'master' branch.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development