persist the world across runs
shapr opened this issue · comments
There's already a writeWorld
and readWorld
that can be used for this. Details:
- A background thread should be spawned that occasionally calls
snapshotWorld
and writes the result usingwriteWorld
. - When the server terminates, it should also
writeWorld
before exiting. - At startup, the system should first try to read
world.json
, and if it exists, use that world. Only if there's no world would it recreate the world from the sample.