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
➜ SMAUG
➜ SMAUG coding
➜ External Command Handler?
External Command Handler?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Kris
USA (198 posts) Bio
|
Date
| Fri 04 Oct 2002 09:22 PM (UTC) |
Message
| Heya Nick. I was talking with Trax earlier about a fascinating idea. It would be really awesome if there was a way to add/modify code without having to reboot/recompile the main mud itself.
There are only two ways I can think of. One is having a seperate .exe command handler process, which the main mud could call. That way, you'd only have to recompile the handler, not the mud itself. However, to do this, they would both have to have a shared memory space between them; I have no idea how that would be accomplished, or even if the API calls exist for that.
The other idea is to have .dll extentions that the mud could use. However, I have no idea if cygwin is capable of compiling/linking dll files. Plus if it can, I'd have no idea how. Trax is a unix man, so he's about as clueless as I am; tho he did something similar successfully on his mud running in a unix environment.
Do you have any ideas about this? I think it would be really awesome if smaug could be adapted for something like this under windows =)
--Kris
| Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 05 Oct 2002 10:53 PM (UTC) |
Message
| You could probably make that to work, although I'm not sure about Cygwin. Under normal Windows I think you could dynamically add a DLL and then un-add it later, and replace with a different one.
Another approach that some servers are taking (eg., Dawn Of Time, PennMUSH) is to support "hot rebooting" which is a reboot of the server, but keeping all players connected.
I think Cygwin has some dynamic library support but I am not really an expert on those, so I can't say how well they would work. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Kris
USA (198 posts) Bio
|
Date
| Reply #2 on Sun 06 Oct 2002 12:18 AM (UTC) |
Message
| Ahh yah I have hotboot on my server already; the copyover smaug snippet. However, that won't work for a recompile; the copyover occurs too quickly. Hmm well I'll keep toying with ideas then; even if cygwin could do that dll stuff, I'd have no idea how to do it anyways hehe.
| Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #3 on Sun 06 Oct 2002 01:08 AM (UTC) |
Message
| Here's another approach that might work. You could separate out the comms (needed to keep players connected) from the rest of the system, and "pipe" commands from one to the other, and then pipe the responses back. That way you could conceivably drop the command handler and quickly replace it, whilst keeping the connections alive. Not sure if it is worth it, just a reboot at 3 am might do the trick (of course, 3 am in one part of the world is prime time in another part). |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Ddruid
(3 posts) Bio
|
Date
| Reply #4 on Tue 08 Oct 2002 02:11 AM (UTC) |
Message
| I am not sure if it is possible under windows, but in *nix you need to look at the dl* system calls, dlopen, dlsym, dlclose, and dlerror, These will load and unload shared libraries. My mud (PirateMud) has basic support for dso's, I currently am only using them for spec. function's but have plans to incorperate them into other things. There is a performance loss, and I am not sure if I will keep it in place, it's just as easy to recompile and reboot :p
Personally, the copyover stuff I have looked at is questionable, I forsee too many adverse problems of using such a system..
-Druid | 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.
18,865 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top