-
nicoco
any reason for clients to send the "MUC join presence" twice in a row? I've noticed dino does that, is it just a bug related to https://github.com/dino/dino/issues/1457 ?
-
Zash
only twice? those are rookie numbers. poezio used to send 8+ or so
-
nicoco
haha ok
-
Kev
Clients should only send the join once.
-
nicoco
what should I do? send a "kick" (110, 333) before completing the sequence? just ignoring it?
-
nicoco
(also, reporting the issue to dino, yeah ;))
-
Kev
As a server? Pretty sure 45 covers this, and IIRC it says that you should treat the second join as a fresh join.
-
nicoco
ok. ignoring sounds tricky, the client may have shutdown or the connection broke and it is trying to join again. so treating it as a new join is okish, except for the part where in large groups this means sending a ton of useless presences
-
nicoco
thanks for your replies, it makes my "lazy loading" (delaying presences after join) of participants trickier to implement than I hoped it would be, but that comes with open ecosystems I guess :)
-
Link Mauve
nicoco, note that clients such as poezio have optimisations for presences received before the join.
-
Link Mauve
After the join it will treat them all independently, before the join it will batch update its internal state, not sorting the participants list every presence, etc.
-
nicoco
because it sends joins 8 times? :D
-
Link Mauve
No, only once nowadays I think?
-
nicoco
hehe I'm kidding
-
Zash
Note that clients may send a separate presence to set their presence in the chat.
-
nicoco
anyway, I think it makes sense for super large groups to send the subject before the whole list of participants, especially in the contacts of presences containing vcard-temp hashes for avatars
-
Kev
> Note that clients may send a separate presence to set their presence in the chat. Right, but that won't have the MUC join element in it.
-
Kev
> anyway, I think it makes sense for super large groups to send the subject before the whole list of participants, especially in the contacts of presences containing vcard-temp hashes for avatars Except that the spec requires that you don't?
-
jonas’
yes, don't do that
-
jonas’
client software relies on that order to know when the join sequence is complete
-
Zash
Isn't it a valid optimization tho, to pretend participants aren't really there until they say something?
-
jonas’
maaaybe, but that's differetn from "sending subject first, then presence flood"
-
nicoco
jonas', Kev: well, it just looks like I'm the only participant, then a bunch of people join afterwards?
-
nicoco
is that really that bad?
-
nicoco
I thought it was an OK optimisation
-
jonas’
nicoco, note what Link Mauve says: knowing that "this is the initial presence flood" allows for important optimizations
-
Zash
I'd probably keep a cache of the last active participants and send only those, then subject, then inject presence for whoever speaks that weren't in the cache.
-
jonas’
nicoco, you can avoid re-sorting lists and stuff, which means reducing complexity from O(n² log n) to O(n log n)✎ -
jonas’
nicoco, you can avoid re-sorting lists and stuff, which means reducing complexity from O(n² log² n) to O(n log n) ✏
-
nicoco
in fact, participants that have spoken since slidge was started will have their presences sent before the joiner presence and subject
-
jonas’
if you do what Zash says though and only send a "relevant" subset of presence, you obviously win
-
jonas’
nicoco, I do not understand that sentence
-
nicoco
slidge starts, receives messages from Bob in group A. when dino joins group A, Bob presence will be sent unoptimized (ie, before the join sequence).
-
nicoco
but also, on the first join by a client of group A, slidge will make a legacy API call: "fetch all members of group A"
-
nicoco
and (a) I don't want this to be blocking for the join sequence (b) I never even want to retrieve this member lists for groups that no xmpp will join
-
nicoco
isn't that a valid case for such optimisations?
-
nicoco
> O(n² log² n) to O(n log n) I hadn't thought of that, and maybe I should just block everything then…
-
lovetox
Yes roster sort is a killer
-
nicoco
> I'd probably keep a cache of the last active participants and send only those, then subject, then inject presence for whoever speaks that weren't in the cache. Zash: this is more or less what slidge does. except it's *not only* those who speak that are lazy loaded, all members are (in the limit of what the legacy API allows to retrieve, though)
-
jonas’
nicoco, so when you say "unoptimized", it's a server-side optimization, you're talking about
-
nicoco
yup, server-side
-
nicoco
but I understand that it makes it harder to optimize to clients, which I had not thought about
-
lovetox
If you spam Gajim with join presences it will simply freeze because roster sort will take all cpu
-
lovetox
It's not expected that servers ddos you with presence after successful join
-
lovetox
Also xeps depend on roster being complete
-
nicoco
lovetox: from what I've experienced, in practice, it makes "joining takes a little time" to "instant join", but my desktop is beefy.
-
lovetox
See for example the mic hats xep
-
lovetox
nicoco: because you test it with one MUC, but clients join 30
-
Link Mauve
nicoco, do you want some toaster to play with? :)
-
nicoco
ok, I had been advised to do this optimisation in here before, but apparently it sucks then :)
-
Link Mauve
Did we?
-
nicoco
Link Mauve: I do have my android✎ -
nicoco
Link Mauve: I do have my android device as a toaster, just harder to test during dev with it because android ✏
-
nicoco
Link Mauve: oh yeah, but I will not point fingers :P
-
nicoco
the really annoying part I guess is that I want to include the vcard-temp thing in the initial presences
-
nicoco
but I guess I should first send a list of presences without it, then for participants that have avatars send another one after (unless avatar has been retrieved, processed, and hashed before)
-
nicoco
this is worse server-side, but if it's better client-side, I'll just ditch my recent "lazy load participant" optim, ok
-
jonas’
nicoco, that could very much work, yes
-
jonas’
nicoco, also, if this lazy loading of participants is only needed on the first client join and afterwards you can cache the stuff inside slidge, maybe it's bearable.
- Link Mauve getting flashbacks of trying to join a Matrix room, and it would take hours to download the state from the legacy protocol and not notify whatsoever of any progress.
-
Zash
That's what people want apparently 🤷️
-
Zash
Just make sure that all the messages arrive out of order
-
nicoco
tbf it doesn't have to be like that. discord or telegram large groups just don't load the participant list on join, and only when you try to display it.✎ -
nicoco
tbf it doesn't have to be like that. discord or telegram large groups just don't load the participant list on join, only when you try to display it. ✏
-
jonas’
MIX can do that, too.
-
jonas’
but nobody likes MIX for whatever reason.
-
msavoritias
I do o/
- msavoritias hides
-
nicoco
I know :) I initially thought I'd support MIX instead of MUC for non-anon groups, but it seems very few clients will implement MIX, so I don't have a lot of incentive to do so…
-
jonas’
the chicken-egg-issue
-
jonas’
no servers -> no clients. no clients -> no servers.
-
msavoritias
yep. but we could do more to change that 😕
-
jonas’
like implementing MIX in gajim|dino|... instead of NIH-ing? :-)
-
msavoritias
i would settle for accepting MIX is where we are heading and its better than MUC
-
msavoritias
for starters
-
msavoritias
then we can work on implementing everywhere 🙂 I would be interested to
-
jonas’
define "we"
-
nicoco
I'm not against adding support in slidge, but I just feel too amateurish to implement it "in the dark", ie, without being able to test against a client while developing
-
msavoritias
> define "we" xmpp community ↺
-
msavoritias
i know you specifically are not so against it
-
jonas’
nicoco, I also think that a gateway component is probably not the right thing to vanguard a rollout---as useful as gateways are, they are pretty nieche compared to common MUC usage.
-
nicoco
agreed
-
jonas’
msavoritias, thing is, agreement is just words. if nobody does it, that won't help. doing it on server and client side is what manufactures agreement.✎ -
nicoco
but at the same time, I support rich replies, reactions, etc. so…
-
jonas’
msavoritias, thing is, agreement is just words. if nobody does it, that won't help. doing it on server and client side is what manufactures actually useful agreement. ✏
-
Zash
There's the matter of ROI tho, the benefits of a big rewrite don't seem worth it and would take you backwards until you catch up to feature parity with MUC.
-
jonas’
correct
-
Zash
While slowly applying small fixes to MUC until it becomes close enough to MIX that we can just slap some protocol translations on it, seems more feasible.
-
Zash
(as a server developer who is _not_ getting paid to implement MIX (or at all))
-
msavoritias
> msavoritias, thing is, agreement is just words. if nobody does it, that won't help. doing it on server and client side is what manufactures actually useful agreement. well words are powerful and helps us change the culture around it. but fair i know i need to do stuff myself 🙂 ↺
-
nicoco
lovetox: isn't receiving "a flood of renames" the same as getting "a flood of presences after join"?
-
lovetox
A flood of anything after successful join is bad I guess
-
lovetox
I have to display renames to the user
-
lovetox
Also joins ans lefts if the user wants
-
lovetox
But why would you send a flood of renames?
-
nicoco
to avoid blocking while fetching participants "display names", but OK, I'll make that blocking the join. it's marginal, only on the first joining a MUC since slidge was started, and also, I'll probably cache that persistently in the future™
-
nicoco
thanks for your replies
-
nicoco
btw, why do you need to sort participants? isn't that only needed when the "muc roster" is shown?
-
jonas’
UI frameworks may still do that automatically unless you tell them to hold their horses for a moment
-
jonas’
(and "for a moment" should generally not be too long, so what you'd typically do is buffer the participants in the xmpp client layer and flush them into the list only later)
-
jonas’
and "doing things only when showing" is how you get sluggish UIs :|
-
sagaracharya
jonas: What's your real name?
-
sagaracharya
Re-add me to the XMPP group and apologize
-
sagaracharya
I'm not going to speak the way you want me to
-
sagaracharya
And if you outright label correct things as wrong, you're gonna be sorry when you see the truth
-
MSavoritias (fae,ve)
i think this is the time to bring up the CoC :)
-
msavoritias
https://xmpp.org/extensions/xep-0458.html
-
jonas’
plus the specific rules for operators@: https://xmpp.org/community/channels/operators/
☝️ 2 -
jonas’
sagaracharya, as per the operators@ rules, your ban will be lifted after a day.
-
jonas’
we expect you follow the rules then, or stay out of the place.
-
jonas’
and with that, I'd like to close the discussion here, because moderation of operators@ is not on-topic here.
-
jonas’
you may discuss moderation, while following the rules, once you're allowed back in.
-
nicoco
jonas': I see, thanks for the explanation. but then it's a matter of sluggish UI vs sluggish joining :)
-
jonas’
I take sluggish one-time-action with a clear "something is happening here" indication over sluggish overall UI any day.
-
sagaracharya
jonas: So will you apologize after a day?
-
sagaracharya
After a day, we'll discuss if your action was biased or not and you will apologize
-
sagaracharya
Every small deviation from your expectations is not even remotely a 'violation of rules'
-
sagaracharya
I will clearly quote your provocation following which you can apologize
-
Zash
sagaracharya: This channel is for technical discussions, please stop.
-
moparisthebest
> There's the matter of ROI tho, the benefits of a big rewrite don't seem worth it and would take you backwards until you catch up to feature parity with MUC. See: nearly 14 year old Wayland, not yet at feature parity with X✎ ↺ -
moparisthebest
> There's the matter of ROI tho, the benefits of a big rewrite don't seem worth it and would take you backwards until you catch up to feature parity with MUC. See: nearly 15 year old Wayland, not yet at feature parity with X ✏ ↺
-
Link Mauve
Thankfully!
-
msavoritias
^
-
moparisthebest
Also see https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/ re: rewrites
☝️ 1 -
jonas’
I was wondering whether I should search my history for that :)
-
Zash
This was the article I had in mind when I wrote that about ROI :)
-
lovetox
Mix would not be a rewrite it would be a additional to muc and the trying to find good abstractions over both in your code and horribly fail
-
lovetox
Hm can servers not do a mix - muc bridge kind of thing where I have to implement only mix
-
singpolyma
Sure, if we decided MIX was a good idea we would want that in both directions
-
moparisthebest
As is mix has no backwards compatibility with muc so all channels would just be completely seperate, that 100% needs fixed before implementing it would even be feasible
-
moparisthebest
Mix was spec'd for closed deployments and is only useful there at the moment
-
Kev
Other than being 100% not true, I agree with what you say.
-
Ge0rG
I remember heated details about making details of MIX work in a way that would allow to join a MIX room from a MUC client
-
Ge0rG
but then again I'm getting old, and I probably dreamed that up
-
moparisthebest
Well if it was spec'd for the open federated network I would have expected some thoughts about an upgrade path for muc besides "flag day!"
-
lovetox
The problem with MUC is, that it's not bad enough for people wanting to switch
-
Ge0rG
unless you have a MUC with thousands of users
-
msavoritias
or want to work around stuff like presence above
-
msavoritias
also yes MIX can be implemented side by side.
-
msavoritias
so we dont have to do all at once
-
msavoritias
this is the kind of words I was talking about 🙂
-
jonas’
lovetox, is https://xmpp.org/extensions/xep-0408.html what you were asking for earlier?
-
Kev
There's no flag day, you just have the rooms support both MUC and MIX.
-
msavoritias
yep
-
moparisthebest
Side by side is the split-network-flag-day approach, single rooms that support mix and muc is the only sane upgrade path, has any of that been specified or implemented ?
-
msavoritias
thats a moving the goalposts now. but I am out of this discussion anyway...'✎ -
msavoritias
thats moving the goalposts now. but I am out of this discussion anyway...' ✏
-
jonas’
moparisthebest, XEP-0408?!
-
moparisthebest
What goalposts moved? I've always said mix must have backwards compatibility or an upgrade path that isn't "ok everyone move to the mix room now" (flag day) to be usable on the public federated network (for the record, the only network I care about)
-
singpolyma
I think that's always been a part of the MIX design
-
singpolyma
Personally I find mix over complex and don't really like it on its own terms myself, but if your main issues is back compat it's not too hard
-
moparisthebest
> moparisthebest, XEP-0408?! Very cool, I guess https://xmpp.org/extensions/xep-0408.html#mix-muc-invite-choice should be changed so an invite is valid for both because disco is useless and it seems likely 1 account will have multiple clients some of which only do muc and others mix for sometime ↺
-
singpolyma
What's wrong with disco?
-
singpolyma
Oh, you mean disco against the client
-
moparisthebest
I'm using multiple clients only half of which are online at any time
-
moparisthebest
Yes, sorry