Skip to content
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

SSS: Enter "recovering" mode if the app has been offline for "a while" #3935

Closed
erikjohnston opened this issue Sep 3, 2024 · 5 comments · Fixed by #3995
Closed

SSS: Enter "recovering" mode if the app has been offline for "a while" #3935

erikjohnston opened this issue Sep 3, 2024 · 5 comments · Fixed by #3995
Assignees

Comments

@erikjohnston
Copy link
Member

c.f. element-hq/element-x-ios#3223 (comment), cc. @Hywan

This helps ensure that the next sliding sync request is responded to fast by the server. If we use a pos token from a long time ago with the full range, the server will need to respond with potentially lots and lots of updates, which might take a while

It'd be good to reduce the range back down to [0-19] after some time of inactivity (but not reset the connection, like we do when we see a connection error/timeout). This will then allow the server to (hopefully) respond quickly to the first request and for the client to fetch the rest of the updates in when the list grows. I don't think it really matters too much if we reduce to [0,19] relatively quickly, so I'd probably suggest a 1hr timer would be a good first try.

@Hywan
Copy link
Member

Hywan commented Sep 3, 2024

Thanks for creating the issue.

@ara4n
Copy link
Member

ara4n commented Sep 3, 2024

why do we need to do this, if the server is forceably resetting the client when the backlog gets too big (or too much time goes by)? it feels like the server should be the on telling the client when to recover (by resetting it) rather than the client having to guess what's going on in the server.?

@erikjohnston
Copy link
Member Author

@ara4n resetting the connection adds extra load to the server, clients and bandwidth as we resync all the old rooms (including state etc). Having the client reduce the range allows us to have a fast sync without losing having to resync everything.

@erikjohnston
Copy link
Member Author

(We should and will still reset server side if there are too many updates though)

@ara4n
Copy link
Member

ara4n commented Sep 4, 2024

ah right. so another way of putting it: "if a backlog has built up, it's better to work through it incrementally by repaginating over the roomlist rather than having a long delay to catch up with the full range (if the SSS session hasn't reset)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants