TinyMudServer Copyover?

Posted by Arew264 on Fri 12 Jan 2007 02:22 AM — 2 posts, 12,250 views.

#0
I have been wondering about the possibility of a copyover command for TinyMudServer. I know the basic idea is to reboot the mud without closing sockets, but... wha??? how would you do that? at all?

I've been trying to find a codebase in C++ that has it implemented to figure out how it works, but I haven't found a good example implementation yet.
USA #1
What you do is write the socket descriptor numbers to file, and then replace the process using exec. In Unix-land, that doesn't close the sockets and so forth, allowing you to use the numbers to reconstitute the connections. Of course, you also need to write a bit more information, such as which players are where, and so forth. A "perfect copyover" would in fact store the whole state of the game, but that's fairly difficult to get right.

(It'd be a lot easier if the world state were stored in a format more amenable to it, of course. Nick's ID manager system that I am using would help, but ideally one would use e.g. Lua and just serialize the entire state.)