On restart warning, take server state (sign/encrypt if you want to) and dump it to each players' clients.
If both players are still connected once the server comes up and client reconnects, both players can send state to server and if both players' global states match then the game resumes, if not then error out. If only one player reconnects cause the other couldn't wait & closed tab, then you gotta error out anyways.
Then you don't need Redis or any other additional dep at least.
If both players are still connected once the server comes up and client reconnects, both players can send state to server and if both players' global states match then the game resumes, if not then error out. If only one player reconnects cause the other couldn't wait & closed tab, then you gotta error out anyways.
Then you don't need Redis or any other additional dep at least.