[Standards] Use of XEP-0198 resumption under adverse network conditions

Thilo Molitor thilo at eightysoft.de
Thu Nov 5 09:11:20 UTC 2020


Hi Dave.

> Our proposal is that when a session is found to be unresponsive, the server
> starts sending push notifications for unacknowledged (and future) messages,
> but otherwise leaves the session live when resumable. Only after a
> significantly longer timeout should the TCP session be terminated (and at
> that point destroy the session entirely).
Like Marvin explained, prosody already does something like this.
The default setting for `smacks_max_ack_delay` is 30 seconds [1].
A push will be generated if an ack is pending for more than 30 seconds and the 
outgoing XEP-0198 queue is not empty.
Every new stanza added to the queue while the timeout expired will generate an 
additional push.
The standard TCP timeout of prosody is usually much higher --> standard 
prosody seems to already follow your suggestions pretty well :)

Not sure how ejabberd handles this, though.

- tmolitor

[1] https://modules.prosody.im/mod_smacks.html


Am Mittwoch, 4. November 2020, 14:17:00 CET schrieb Marvin W:
> Hi Dave,
> 
> Thanks for your message. From my experience with mobile phone networks
> when traveling in Germany (not sure if it applies in other countries, as
> German mobile networks are far below average in my experience), I can
> confirm that temporary connectivity loss is not handled perfectly well
> in some scenarios (although I am not sure if this is a server or client
> side issue).
> 
> On 04.11.20 12:46, Dave Cridland wrote:
> > Our proposal is that when a session is found to be unresponsive, the
> > server starts sending push notifications for unacknowledged (and
> > future) messages, but otherwise leaves the session live when
> > resumable. Only after a significantly longer timeout should the TCP
> > session be terminated (and at that point destroy the session
> > entirely).
> 
> FWIW, this is within the bounds of the current specification. XEP-0357
> leaves it completely open which events warrant a push notification.
> 
> The prosody mod_cloud_notify already is supposed to send push
> notifications when the session is still considered "live", but the
> outgoing message was not ack-ed using XEP-0198 for a certain time (can
> be configured). When using this together with an increased connection
> timeout (which is configurable in prosody's advanced network
> configuration as per <https://prosody.im/doc/ports#advanced>) you should
> be able to realize something that is pretty close to your suggestion.
> 
> Marvin
> _______________________________________________
> Standards mailing list
> Info: https://mail.jabber.org/mailman/listinfo/standards
> Unsubscribe: Standards-unsubscribe at xmpp.org
> _______________________________________________




More information about the Standards mailing list