jdev - 2021-08-08

  1. nephele wonders why matrix traveler bot and Server stats discoverer are here

  2. Sam

    I'd be curious to know what MAM strategy others are using. I'm thinking that if there are no messages in the local archive, query for "before current time" and use RSM to limit it to eg. 100 messages (2x the lines being displayed on the page or something so that we fill it up, or some configurable metric, etc.). If there are messages in the archive we just query for after-id=<most recent message>, sorting backwards, and we page through all messages no matter how long async. If the user scrolls to the top, we always query for before-id=<earliest message> and page every time they scroll back to the top. Are there other/better strategies?

  3. MattJ

    I'd like to document the strategies clients are using, if anyone fancies a PR to modernxmpp. My hope is that we could formalize some good strategies in an informational XEP one day.

  4. Sam

    I've been thinking the same thing; hadn't thought of modern xmpp as the place to do it though. I'll write something up and see if I can make a PR after work.

  5. Sam

    https://pad.disroot.org/p/MAM_Strategies in case anyone else wants to collaborate or write something up in the mean time. I'm at work so I can't actually do a normal PR or anything right now.

  6. MattJ


  7. Zash

    I get the impression that the most common strategy currently is to start at the oldest message (or the beginning of time) and page forward until you catch up to 'now'.

  8. MattJ

    Gajim at least doesn't do that

  9. MattJ

    Most clients seem to prefer an upper bound on age, which makes sense

  10. MattJ

    But without unread tracking that can be problematic

  11. Zash

    Ah, yeah, adding some upper bound on age is likely the step after that. Not sure if Dino has something like that, first start doesn't happen that often 🙂

  12. MattJ

    The problem is that once you do that, you're in Holes territory

  13. MattJ

    and tracking of holes is a whole new field of complexity

  14. Zash

    I'd still like to see what happens if you start at 'now' and go backwards until you reach the end of your previous session.

  15. Sam

    I don't like that strategy for a couple of reasons; one is that notifications become difficult, you either end up displaying dozens of them if you're just doing the naive thing or you have to special case it and pause notifications, then check at the end if you have anything without read markers, etc. plus if you update the UI for every single message it slows everything down

  16. Zash

    The "everything from the beginning" strategy?

  17. Sam

    oh yah, sorry

  18. Sam

    Not to mention that you just don't have your messages for a while and the earliest history is the history you're least likely to need soonest