[Standards] Whitespace "ping"

Ненахов Андрей andrew.nenakhov at redsolution.ru
Sun Jun 16 09:39:34 UTC 2019


вт, 11 июн. 2019 г. в 19:26, Dave Cridland <dave at cridland.net>:
>
> I think the optimal ping, from the server's perspective, radically changes depending on whether there are outstanding messages, and whether there's an outstanding XEP-0198 ack.
>
> From a client's perspective it's really dependent on whether the user is active, and if not, whether there is a push notification scheme in play.

I believe that server to client and client to server pings server
different purposes:
* Server to client ping  is needed to show remote contacts if the user
is still online on his device, so, messaging him right now is likely
to reach him immediately.
* Client to server ping is needed to tell a client that he's still
connected and is likely having a current info about his roster
presence data. He doesn't worry too much if his outgoing message will
fail, cause he'll likely know about that in some way (btw in ancient
days we even used ping as a cheap to implement means of delivery
control - we have sent a ping prior to sending a message and
immediately after)

And all of this mattered most on mobile devices with unstable
connections. With current trend of mobile OSs pushing developers to
not run processes in the background, and apps having to rely on push
notifications, sending pings to clients to check if they are still
there is becoming less and less important. So, server to client ping
is becoming less relevant, and client to server ping and it's goals
can probably be achieved by different means. But in the current moment
we still run S2C pings every 2 minutes.

What IS important is a way to signal remote contacts that a user is
not just 'offline' if he does not have any active presences. We think
it should probably be an extension to XEP-0357 that is sending a
special 'on mobile device' presence to it's contacts. Seeing this,
contacts should assume that they any messages sent to this user will
likely be received by him in more or less timely manner.

-- 
Andrew Nenakhov
CEO, Redsolution, Inc.
https://redsolution.com


More information about the Standards mailing list