jdev - 2023-05-12


  1. MSavoritias (fae,ve)

    If i have a groupchat with millions of messages and thousands of people. Can it be guaranteed by xmpp that each message can be referenced and fetched by a unique id that will always be unique? I remember the convo a few weeks back and it seems that there is such a thing. Just wanted to double check.

  2. Ge0rG

    MSavoritias (fae,ve): messages in MAM are required to have a stable unique ID

  3. Ge0rG

    typically UUID4 or similar is used by the implementations

  4. Guus

    https://xmpp.org/extensions/xep-0359.html

  5. MSavoritias (fae,ve)

    > MSavoritias (fae,ve): messages in MAM are required to have a stable unique ID I am interested outside of MAM

  6. MSavoritias (fae,ve)

    My usecase is basically: A user was offline for a bit. And they can fetch all messages from other users in the groupchat based on that id

  7. Zash

    Fetching messages is done with MAM. I don't understand.

  8. MSavoritias (fae,ve)

    > https://xmpp.org/extensions/xep-0359.html Ah i see. And since the generating entity is the room server they are guaranteed to be unique then. Nice

  9. Guus

    You should be able to use the stable/unique ID of the last message that you locally have to perform a MAM query to get all new messages 'since' that message.

  10. Guus

    I have no experience with how this performs on the scale that you're after. I expect that mileage will vary enormously, depending on implementation details.

  11. MSavoritias (fae,ve)

    And since every message has that unique id every message is unique in the context of the groupchat i am guessing

  12. MSavoritias (fae,ve)

    But yeah i will have to test it at scale

  13. Zash

    Yes, the (origin, stanza-id) combination should definitely be unique.

  14. MSavoritias (fae,ve)

    Nice.

  15. Zash

    Unless bugs or something, but that applies to everything.

  16. MSavoritias (fae,ve)

    > Fetching messages is done with MAM. I don't understand. I am interested if a mesh network kind of thing would work. Were you fetch messages from other users in a groupchat

  17. MSavoritias (fae,ve)

    Hence my requirment of seeing if all messages are unique and can be referenced

  18. MSavoritias (fae,ve)

    (Independent of MAM)

  19. Zash gets flashbacks to Skype, where you would constantly get partial and out of order history depending on who was online

  20. Kev

    If I was doing that, I'd still use the MAM protocol, I'd just query the other entities.

  21. pep.

    Well the uniqueness requirement is at the muc level

  22. Zash

    Having a single source of truth is nice, as I'm sure you either know or is about to find out :)

  23. MSavoritias (fae,ve)

    Probably problems with ordering yeah. Also need to know the authenticity and stuff. But still nice to experiment 😁

  24. MSavoritias (fae,ve)

    > If I was doing that, I'd still use the MAM protocol, I'd just query the other entities. Like each user? Hmm. Is it also used now that every user has a MAM database or is it only the server?

  25. MSavoritias (fae,ve)

    But otherwise the idea sounds interesting

  26. MSavoritias (fae,ve)

    The MAM protocol could give me also the ordering so i would know what is missing. Especially if the ids ar unique. And checking with timestamps

  27. Zash

    Trusting a server component to not intentionally re-use IDs is one thing. Trusting thousands of users not to do that is a different thing.

  28. MSavoritias (fae,ve)

    True trui

  29. MSavoritias (fae,ve)

    True true