Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUDs
➜ General
➜ TinyMudServer Copyover?
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Arew264
(8 posts) Bio
|
Date
| Fri 12 Jan 2007 02:22 AM (UTC) |
Message
| 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. | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #1 on Fri 12 Jan 2007 02:56 AM (UTC) |
Message
| 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.) |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
9,740 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top