Slinging Mud: “Graceful” reboots in a Go world
I participated in MUDJAM on Itch.io last year around this time, putting together a very simple, low feature deliverable, BerkMud. If the title doesn’t tell you, it was How to Train Your Dragon themed. It wasn’t my first foray into building a mud but I wanted to do something new so I did it in golang which was completely new to me.
A year later, I got to thinking that there was a lot I had still wanted to do with it. One of those things was figuring out how some muds I used to play (DarkCastle) were able to reboot/upgrade the server without killing people’s connections.
Each player in a mud has their own permanent socket connection to the server. This socket is the sole medium from which the entire game is played. Normally when killing a process, all of the open sockets are closed, so rebooting the server to pick up any code changes would force all current players to have to reconnect
Continue reading →