-
flow
larma, congrats to the 0.1 release of dino :)
-
edhelas
yeah, congrats 🎉 :)
-
!XSF_Martin
Happy release day 🎂
-
marc
🍾
-
rion
Are there any time limitations for receiving iq result/error?
-
Zash
In theory not
-
moparisthebest
heat death of the universe
-
Zash
Not receiving a response is a protocol violation
-
Ge0rG
Zash: and therefore it can't happen!
-
Zash
Correct!
-
Ge0rG
rion: the real question is - what do you do with the iq result that arrives after you already went into the timeout handler?
-
Ge0rG
I think that we need to fundamentally change the semantics at the API layer, where you have a timeout only giving an indication that it's taking very long now, but not removing the actual response handler.
-
Ge0rG
OTOH, we had a handler leak in poezio just because of that
-
rion
Yep. it's what worries me. Assuming I have an app which runs for a very long time.
-
rion
And I mostly merge Psi+ to Psi. Only one patch left, which introduces the timeout
-
Zash
A recently added thing to track IQ stanzas in Prosody (sent by the server itself, not clients) has a default timeout of 2 minutes
-
rion
As far as I understand it has to be very use-case specific. For example for legacy FT a request can wait for a confirmation for hours if not days.
-
rion
Requesting conferences' list on slow connection sometimes takes ages. So everything is relative.
-
rion
But anyway, it would be nice to have some recommendations about timeouts in the standard and some XEPs
-
moparisthebest
it probably needs to vary wildly based on what you are doing
-
rion
Agree
-
moparisthebest
if you are writing a system designed to talk over satellites it's going to need to be much higher than if you are developing a system to talk between servers on the same 10gbe network
-
moparisthebest
but yea, recommendations for "normal chat clients" would surely be a good idea
-
jonas’
timeouts are always wrong :(
-
lovetox
my idea is to not have timeouts
-
lovetox
for IQs, rather i pass the application a cancel handle
-
lovetox
The Application knows best when it does not make any sense anymore to process the response
-
lovetox
so it uses the cancel handle to remove the callback
-
lovetox
this is also important for if the user cancels the process , does not even mean the IQ did take long
-
jonas’
true
-
lovetox
but if he opens some window that triggers fetching a list via IQ, and just closes it agian
-
lovetox
the application needs to remove the callback response
-
jonas’
for some automated tasks you’d still want timeouts though
-
jonas’
for example automated disco#info lookups
-
jonas’
you don’t want those to accumulate
-
lovetox
yeah ..
-
lovetox
probably timeouts do make sense in some situations
-
jonas’
in asyncio, you’d simply properly handle cancellation of the IQ request coroutine and thus allow the user to use asyncio.wait or something like that.
-
moparisthebest
but it sounds like you are saying your library makes timeouts the application's responsibility? which sounds like the right choice
-
lovetox
but for IQs you cancel the callback and you are fine
-
lovetox
more anoying is stuff like
-
lovetox
muc join
-
lovetox
where you have no way of tracking
-
lovetox
you cant cancel a muc join
-
jonas’
lovetox, you can send presence unavailable
-
jonas’
effectively removing yourself from the muc right after
-
lovetox
thats not a cancel
-
jonas’
you can’t cancel an IQ either
-
lovetox
no, but i can ignore it with simple dont listen for the callback
-
lovetox
and i know the id i have to ignore
-
lovetox
but with mucs, there is no id tracking
-
lovetox
the muc simply starts to spam me with presence, and even messages
-
jonas’
you track by from and presence type tho
-
lovetox
i have to start ignoring the whole jid
-
jonas’
yeah, and if a MUC does that, you reply with presence type="unavailable" and possibly message type="error"
-
lovetox
yeah, just saying i find it more annoying, i track now which mucs are in joining state, and if the user clicks abort
-
lovetox
i simply put the muc jid on the ignore list
-
lovetox
which is probably wrong
-
lovetox
because i could get invites from there
-
lovetox
i think i have the ignore list only for presence
-
lovetox
not for messages though
-
lovetox
but you are right, i should respond with presence unavailable
-
lovetox
but again only on the first presence i receive from that muc
-
lovetox
which again i have to track
-
lovetox
what would usefull is, if all join related messages, presence had a join-id attr like we have with mam the queryid attr
-
lovetox
but k muc is really old
-
Ge0rG
Every MUC is Schrödinger's Chat.