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

Persist lobbies across restarts #1

Closed
jftanner opened this issue Oct 9, 2020 · 1 comment
Closed

Persist lobbies across restarts #1

jftanner opened this issue Oct 9, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jftanner
Copy link
Member

jftanner commented Oct 9, 2020

Feature

Store lobby data so that it's not lost whenever the bot is restarted.

Reasons for Implementing

When the bot is restarted for an update or maintenance, any lobby in progress is lost.

This causes a few problems:

  • Users' original nicknames are lost, and can't be restored.
  • Users are left muted/deafened.
  • Games in progress are no longer tracked/automated.
  • Lobby info posts are left behind in text channels.

Ideas & Details

A couple options for storing lobby info:

  • Use the local file system as a database and use mounted volumes.
  • Use a remote database (CouchDB?) to store data.

The main problem is how to serialize lobby data in a way that can be recovered. Whichever instance of the bot is handling the shard on startup will need to be able to load the lobby and resume where the previous instance left off.

The capture app shouldn't be a problem, since Socket.IO supports automatic reconnection. It should simply reconnect to the new instance smoothly. Update: While Socket.IO does automatically reconnect, the capture app doesn't resend the connect code. That'll need to be patched.

Alternatives

One other option would be to add a graceful shutdown order which ends all existing lobbies.

@jftanner jftanner added the enhancement New feature or request label Oct 9, 2020
@jftanner jftanner self-assigned this Oct 9, 2020
jftanner added a commit that referenced this issue Oct 11, 2020
This version includes reconnection features which will enable future releases to persist lobbies across restarts.

Connected to #1
jftanner added a commit that referenced this issue Oct 12, 2020
Players, however, do not. (Yet.)
Connected to #1
@jftanner
Copy link
Member Author

Fixed in v2.0.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant