jaw-sh / stream-nexus

Unified multicast stream chat overlay.
25 stars 8 forks source link

Super chat persistence #20

Closed cohlexyz closed 1 month ago

cohlexyz commented 8 months ago

Considering the cluster fuck that the last stream was it might be a good idea after all to have some persistence for the super chats. Since my initial implementation of (temporarily) storing them in the browser local storage wasn't ideal we could also just make the server save them to a json file.

So the server would continually back the donations up to that file while it's running so that if it shuts down unexpectedly it can load them from there when it is started again. If the server is properly shut down (i.e. with CTRL+C) it would delete the file to make sure that it wouldn't load old data.

Definitely not perfect but probably better than losing the data to the next blue screen.