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

Persist game session data across server restarts #30

Open
soceanainn opened this issue Jan 3, 2021 · 0 comments
Open

Persist game session data across server restarts #30

soceanainn opened this issue Jan 3, 2021 · 0 comments

Comments

@soceanainn
Copy link
Owner

Game session data could be persisted in a DB / external cache, but this would incur an additional cost for running this website. As this is currently a personally funded project, cost efficiency is crucial.

One possibility is to persist copies of game session data using client side cookies. While this may be subject to abuse, the rough idea is that:

  • each client (player) stores a copy of their game session data as a cookie
  • when clients reconnect to the server for an in-progress game that the server has no information on, server requests a 'recovery' from that client
  • client returns their copy of the game session data

To stop malicious actors from creating modified game sessions and to ensure the game session data returned by client is the most recent version of data optionally this could be extended so that:

  • server issues 'recovery' request to all clients listed in the game session data returned from first client
  • once a quorum has been established (a sufficient number / the majority of clients agree on the latest game session data), the server restores the agreed on game session data
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

No branches or pull requests

1 participant