2 ms·
A MUD I worked (uh volunteered, as a total newbie) on had a soft-reboot implementation for deploys that blew my mind when I first saw it in action. Open telnet
by munk-a 6y ago
A MUD I worked (uh volunteered, as a total newbie) on had a soft-reboot implementation for deploys that blew my mind when I first saw it in action. Open telnet connections were all sent keep alives before the MUD launched a new instance of itself from the executable (which may have been a different version from the currently running copy) and then killed itself. To users on the other end a message appeared saying "Relaunching the server" and was followed up shortly by "You may now resume play". Since this engine was designed to constantly fall over due to instabilities and OOMs it stored the current game state in a persistent state (originally on-disk files - most of it was migrated to MySQL) so the only things that really needed hacking were re-acquiring the right sockets and remembering which user is which.
This included, FYI, under development new game elements which were mostly written and launched using a mix of things called RPROGs, OPROGs, CPROGs and Descs (among other things) all of which were written in a custom domain language input into the MUD itself - devs like myself worked only on underlying mechanics and had no need to wander into the specifics of all those triggers.
This probably opened up a number of security holes but, given that the game only ever checked the first six characters of a password (and checked them one by one against a plaintext copy - that was patched) there were lower fruit available to criticize.
If you want to check it out an older copy is available open-sourced[1] - it's a DIKU variant MUD.
1. https://github.com/webbj74/RPI-Engine https://github.com/webbj74/RPI-Engine
- endgame 6y agoCopyover MUD servers used to do all sorts of cool stuff. I remember seeing one that would reboot by: 1. Open a pipe 2. fork() 3. parent exec()'s the new binary with an argument saying "reload yourself from pipe at FD #n" 4. child writes the entire game state including open connections down the pipe, and closes It's done this way so the PID of the process doesn't change.
- akkartik 6y agoGreat example of the benefits of crash-only software. https://www.usenix.org/legacy/events/hotos03/tech/full_papers/candea/candea.pdf https://www.usenix.org/legacy/events/hotos03/tech/full_paper...