[ejabberd] Handling Groups

Jai Rangi jprangi at gmail.com
Thu Oct 24 22:21:18 MSK 2019


History attribute in presence seems to solve one problem. We use last
message received timestamp to pull all the messages from the group while
user was offline.

<history since='1970-01-01T00:00:00Z'/>

But here I run in another.
On main screen, we are updating the missed message count. For that reason,
need to send presence for all the groups. We were using multicast to send
presence to all the groups. Now since multicast does not offer history
attribute, we have to send presence and process the messages for each group
and that is causing the delay in the app. Around 600ms for each group. So
for 25 group it can be anywhere 15-20 seconds and that is quite noticeable.
Things can only get worse from here.

Any suggestions?









On Mon, Oct 21, 2019 at 6:50 AM Jai Rangi <jprangi at didforsale.com> wrote:

> Thank you for the suggestions, I will try these and report back.
>
> Jai
>
> On Mon, Oct 21, 2019 at 2:55 AM Holger Weiß <holger at zedat.fu-berlin.de>
> wrote:
>
>> * Jai Rangi <jprangi at gmail.com> [2019-10-20 14:10]:
>> > Working on a mobile chat application using xmpp-framwork. Having a
>> little
>> > issue with group, using mod_muc for that.
>>
>> The MUC extension was created before mobile was a thing, so some things
>> will feel a bit weirdo.  But you should be able build modern group chat
>> functionality using MUC.  See, for example, how the Android client
>> Conversations¹ implements it.  (There's a replacement called MIX in the
>> works, which tries to address these issues.  ejabberd has initial
>> support, but the spec isn't finalized so it's not quite production-ready
>> yet.)
>>
>> ¹ https://github.com/siacs/Conversations
>>
>> > Issues I am running into is?
>> > - Have to send presence before we send the message.
>>
>> One wouldn't design things this way today, but this as such shouldn't be
>> a problem for you?
>>
>> > - History size is default 20 messages. If the user is offline and if
>> there
>> > are more than 20 messages, user miss the messages older than 20.
>> > - Every time user send presence, server send last 20 messages, even if
>> the
>> > user already has received those messages.
>>
>> See https://xmpp.org/extensions/xep-0045.html#enter-managehistory for
>> how to tell the server to not send any history (maxstanzas='0'), and
>> rely on MAM.
>>
>> > Messages dont get stored in MySql Table
>>
>> For MUC, MAM is enabled on a per-room basis.  To have it enabled by
>> default for newly created rooms, use this setting from the example
>> configuration:
>>
>>
>> https://github.com/processone/ejabberd/blob/19.09/ejabberd.yml.example#L175-L176
>>
>> >     default_room_options: {allow_subscription: true, mam: true,
>> > members_only: true, persistent: false}
>>
>> Your syntax looks wrong.
>>
>> The tricky part on iOS will be push notifications for MUC messages, as
>> the room will only send messages to participants that are currently
>> present in the room.  The possible solutions depend on (whether and) how
>> you implement push notifications in general.
>>
>> Holger
>> _______________________________________________
>> ejabberd mailing list
>> ejabberd at jabber.ru
>> http://lists.jabber.ru/mailman/listinfo/ejabberd
>>
> --
> *Jai Rangi*
> Cebod Technologies LLC dba DIDforSale/Cebod Telecom
> O 949-471-0102 | C 949-419-7634 <1-949-419-7634> | F 949-269-0449 /
> 949-232-1410 | jprangi at didforsale.com  www.didforsale.com |2472 Chambers
> Rd Ste 100, Tustin, CA 92780
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20191024/056482de/attachment.html>


More information about the ejabberd mailing list