-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Current realtime presence sync behaviour after a resume contradicts RTP3 #69
Comments
Well that seems awfully inefficient given it seems perfectly valid to continue a Before removing this, I'd like to understand why a |
Should we resolve this in the 1.1 spec? I think resuming the sync, or being given a new sync, are both valid behaviours and although realtime always starts a new sync, libraries should support both. So perhaps the requirement should be that the client library resumes an interrupted in-progress sync if realtime does not initiate a new sync in the attached response. |
Just to clarify my understanding, are we saying that every time we resume we send an |
|
RTP1 in the 1.0 spec: "(RTP1) When a channel ATTACHED ProtocolMessage is received, the ProtocolMessage may contain a HAS_PRESENCE bit flag indicating that there are currently members present on the channel, see TR3 . If the flag is 1, the server will shortly perform a SYNC operation as described in RTP18 . If that flag is 0 or there is no flags field, the presence map should be considered in sync immediately with no members present on the channel" I.e. realtime guarantees that:
Together, these make it a protocol violation for realtime to send an ATTACHED on a channel with presence members without also doing a full sync. (To put it another way, there's no separate WILL_DO_A_SYNC flag, only HAS_PRESENCE). Seems a bit pointless for client libs to have to support behaviour (resuming a sync in the event realtime fails to do one) that would be a protocol violation if it ever actually happened. |
➤ Automation for Jira commented: The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-2814 |
RTP3:
What happens now is that after a resume, the client gets an ATTACHED and then a full SYNC, automatically and unconditionally. I think this was one of the things Paddy changed with the 1.0 spec, as part of the avoiding-clients-getting-channel-state-out-of-sync changes.
Given this, RTP3 no longer makes any sense. I don't think there's now any situation where the client would need or want to resume a sync -- if they miss part of a sync, that implies a transport interruption, so the action is to disconnect and do a resume, which will do a full sync of everything.
So any reason not to just remove RTP3? @mattheworiordan / @paddybyers ?
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: