-
jonas’
so I’m thinking about the case where SM resumption fails, but the server gives me an ``h`` value in the <failed/> stanza (as allowed in XEP-0198).
-
jonas’
I’m not sure what to do with this information, as a library.
-
jonas’
I can of course mark all unacked stanzas covered by the h value as acked
-
jonas’
that probably makes sense unconditionally
-
jonas’
does it also make sense to automatically re-send stanzas which have not been acked?
-
jonas’
I tend to "no, because we don’t know what happened in the meantime and the application should re-sync state and re-send whatever it wants to re-send"
-
jonas’
i.e. treat the stanzas as "lost" and attach a clear error to their tracking handle.
-
lovetox
hm that would be rather bad in my opinion
-
lovetox
imagine a mobile use case, where the SM timeout is 5 minutes
-
jonas’
what would be "bad"?
-
lovetox
so all messages i send after 5 minutes when im currently offline, get a error
-
lovetox
and i have to retype them?
-
jonas’
of course not
-
jonas’
your client would have a resend button
-
jonas’
or may even resend them automatically
-
jonas’
question is, what should the *library* do
-
lovetox
if you think there is a case where a client does not want to resend them you have to implement this option
-
jonas’
I don’t think that resending by default is the safe way
-
lovetox
whats unsafe?
-
jonas’
(note: not insecure, but unsafe)
-
jonas’
for example, a presence stanza sent to a MUC
-
jonas’
which changes your nickname
-
jonas’
no, bad example, you’d await an ack for htat
-
jonas’
but you get the idea: state was lost, and stanzas were queued under assumption of state which was lost.
-
jonas’
I think re-sending those stanzas under a different state isn’t safe
-
lovetox
does the lib hold the stanzas or the client?
-
jonas’
the lib
-
jonas’
it has the outbound queue where unacked stanzas are kept until they are acked
-
lovetox
then you provide the stanzas, and he can sort stuff out he doesnt want to be resent?
-
jonas’
that’s kinda what happens when I mark them as failed
-
lovetox
as a client dev, i would disable all functionality in the client except sending messages
-
lovetox
to circumvent any complicated problems
-
lovetox
the most important thing is sending a message
-
lovetox
everything else, like changing a nick or stuff like that, can wait until the user is online
-
jonas’
> as a client dev, i would disable all functionality in the client except sending messages
-
jonas’
that statement is confusing
-
lovetox
i mean message from the standpoint of the user
-
lovetox
not from the protocol
-
jonas’
you mean while offline?
-
lovetox
yes
-
jonas’
right
-
jonas’
but you don’t know immediately that you’re "offline"
-
lovetox
dont i? gajim seem to know it pretty sson✎ -
lovetox
dont i? gajim seem to know it pretty soon ✏
-
lovetox
usually after the first stanza
-
jonas’
depends on the failure mode
-
jonas’
right, and that first stanza could be whatever action the user triggered
-
jonas’
also, I’m not sure that blocking most of the UI on intermittend network failures is a good thing
-
lovetox
Gajim blocks all UI, you cant even write messages ^^
-
jonas’
meh
-
lovetox
i agree its not good
-
lovetox
but it needs a lot of work to cache all message, make good ui for it, so the user sees whats sent and what not etc
-
lovetox
and then you still have to think alot about the things you just thinign now
-
jonas’
indeed
-
lovetox
have to go, see you later
-
jonas’
gl
-
flow
jonas’, smack das also resend unacked stanzas on resumption FWIW
-
jonas’
flow, on failed resumption?
-
jonas’
note that this is all about failed resumption.
-
flow
yes, alswas
-
flow
IIRC
-
jonas’
huhm.
-
flow
I see the issues you mentioned, but one has to weight it against the advantages
-
jonas’
I think this conflicts with the state resync which aioxmpp (i think correctly) does after a failed resumption too much to do this by default
-
jonas’
although it could be interesting to auto-resend stanzas after everything else has reported that state has been synced (e.g. MUCs rejoined)
-
jonas’
but that would give things even more time to diverge unknowingly…
-
flow
hmm, also sounds like to much complexity for a minor/very rare/(non existent?) issue
-
jonas’
yeah, I also don’t think this is a good idea
-
jonas’
I think I’ll go the route of: resumption failed? -> mark acked stanzas as acked, mark unacked stanzas as failed and let the application/services deal with it
-
jonas’
because that’s the only way I can provide clear guarantees to the using code
-
jonas’
and aioxmpp is all about clear guarantees
-
flow
now I wonder what the code really does on failed resumption, let me check
-
flow
yeah, smack does simply resend in every case
-
jonas’
ok
-
jonas’
I’ll go with "make unacked stanzas fail"
-
jonas’
this makes "failed resumption without @h" just a special case of "failed resumption with @h", which is conceptually very nice.
-
jonas’
and provides consistency.
-
Ge0rG
jonas’ [12:10]: > I’ll go with "make unacked stanzas fail" That's a good approach. In yaxim, I'm re-sending all messages that are pending, after a reconnect. But obviously only proper messages
-
flow
Ge0rG, so no presences? how do you prevent lost presence updates?
-
flow
by remembering the last presence and resend it on reconnection/failed resumption?
-
Ge0rG
flow: when resumption fails, you need to redo all presence anyway
-
Ge0rG
flow: I'm sending presence from the client preferences on connect
-
flow
ok, nice idea, so on failed resumption you filter messages stanzas out of the list of pending stanzas and only send those
-
flow
that could work
-
flow
and on successfull resumption one could remove all but the last self-presence stanza, although that optimization probably won't give you much in most cases
-
jonas’
on successful resumption, you don’t need to do anything
-
flow
you don't need do, right
-
jonas’
ahh, I see, you want to CSI-style collapse multiple queued outbound stanzas
-
flow
yeah, just some premature micro optimization that nobody should do client side :D
-
jonas’
heh
-
flow
bbl
-
jonas’
gl
-
Ge0rG
The issue with that is that you need to fix the counters. There is a big chance to f* it up.
-
jonas’
you don’t need to fix counters for stanzas which haven’t been sent to the server yet (only queued)✎ -
jonas’
you don’t need to fix counters for stanzas which haven’t been acked by the server yet (only queued / sent without ack)✎ ✏ -
jonas’
you don’t need to fix counters for stanzas of which the server said it didn’t receive them upon resumption ✏
-
Seve
So I sent my application for Board. Please wish me lucky stanzas!
-
jonas’
\o/
-
jonas’
so we’ll at least have a competition for board this year...
-
jonas’
Link Mauve, https://wiki.xmpp.org/web/index.php?title=Emmanuel_Gil_Peyrot_for_Council_2018&action=edit&redlink=1
-
Seve
Very healthy indeed!
-
jonas’
well, maybe. ralphm and arc still need to do their applications.
-
jonas’
Seve, sounds great :)
-
Seve
By the way, last time I think I also had the same problem. Not sure if it was me or some kind of cache. My application link still appears in red colour. Do you remember what was it, jonas’? I feel you were also in the discussion last time I mentioned that.
-
jonas’
yes, that’s some caching
-
jonas’
I think there’s a magic thing you can say to mediawiki to purge the caches, or you just wait
-
jonas’
there we go
-
jonas’
append ?action=purge to the URL
-
Seve
Woah, lovely! Saving that for next time, thanks, jonas’!
-
jonas’
Even though I’m sure that Alex will click the links to be sure that there really is no application before removing candidates when the application period closes :)
-
jonas’
(when clicking the link, you get shown the actual existing page, not the "no page here" page)
-
jonas’
hm
-
ralphm
Yes , I do. Haven't copy/pasted yet
-
jonas’
https://github.com/horazont/aioxmpp/pull/254/commits/f014831357cb7804c0ba6a5b45ebc65f62064bcf#diff-46a421af09863be52f28a8bb03d339d1R34 this is what I went for
-
jonas’
(regarding the stream management discussion from earlier)
-
vanitasvitae
ralphm, can you replace my old blog (https://blogs.fsfe.org/vanitasvitae/category/xmpp/feed/) on the planet with my new blog (https://blog.jabberhead.tk/category/xmpp/feed) ?