Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

Determine how to handle client desyncs #14

Open
randomPoison opened this issue Jun 6, 2020 · 2 comments
Open

Determine how to handle client desyncs #14

randomPoison opened this issue Jun 6, 2020 · 2 comments
Labels
client Changes that affect the client codebase discussion A more open-ended discussion about how to address a paticular issue

Comments

@randomPoison
Copy link
Owner

We need a generalized solution around how we handle desyncs in the client. Currently we're doing a pretty good job of sending the client the necessary pieces of information needed to validate that its local state is still in sync with the server, but we've haven't fleshed out what we actually do when a desync is detected.

@randomPoison randomPoison added discussion A more open-ended discussion about how to address a paticular issue client Changes that affect the client codebase labels Jun 6, 2020
@randomPoison
Copy link
Owner Author

My current thinking is that we should simply throw an exception anywhere we detect a desync, and have a root try/catch block at the top-level of the control flow for each controller. This would play nicely with our current async-everywhere approach and would allow us to specialize the handling to the active part of the game (e.g. have a different desync handling approach for mahjong matches vs being on the main menu). This also avoids the tedium that comes with having to try to handle desyncs in each location where we receive an event from the server.

@randomPoison
Copy link
Owner Author

Oh, I completely forgot that I had even already added OutOfSyncException to the client project. I'm going to experiment with this approach going forward and try to track what works well and what issues I run into in the process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
client Changes that affect the client codebase discussion A more open-ended discussion about how to address a paticular issue
Projects
None yet
Development

No branches or pull requests

1 participant