Remix.run Logo
warothia 8 days ago

Few others have brought up Apache Modules, and they are incredibly similar to my idea. :D Did not know about them while I was developing it. The main difference as far as I could see was the fact that you had to recompile / restart the server. Which I try to avoid, so little changes require almost no recompiling.

mst 7 days ago | parent | next [-]

In apache 1.3 it was far from unusual to do a complete bundled compile and restart the entire thing every time because there were gremlins that showed up when you dynamically loaded the more complex modules often enough that it was operationally less aggravating overall to take the brute force approach (I did quite a bit of that a couple decades back, for my sins).

apache 2+ is a very different (and rather more robust) beast, and also has the 'graceful restart' system - see https://httpd.apache.org/docs/2.4/stopping.html - which makes the parent tell its worker processes to drain their request queues, -then- exit, after which each one is replaced in turn until you've fully upgraded to the new configuration+code.

This approach has its disadvantages, of course, but not that morally different from how erlang processes hot reload into new code, and once you knew what you were doing the end result was simple, predictable, and nicely transparent to end users.

mananaysiempre 7 days ago | parent | prev | next [-]

You might also want to look into ISAPI extensions[1,2] in Microsoft’s IIS, those are also just DLLs that the web server loads into itself, and were once advertised as the most performant way to serve dynamic stuff from it. It doesn’t look like there’s a way to request that extensions be reloaded, though: the server either unloads them at its discretion (once no in-flight requests are using them?) or not at all (if “extension caching” is enabled). But there’s an advert[3] from somebody who shimmed that capability onto it back in 2006.

(You wouldn’t have had a good day debugging these things, mind you. But it’s something that people experimented with back in the day, alongside Web servers programmable in Java[4] or Tcl[5].)

[1] https://learn.microsoft.com/en-us/previous-versions/iis/6.0-...

[2] http://library.thedatadungeon.com/msdn-1998-06/IISRef/devdoc...

[3] https://www.iis.net/downloads/community/2006/12/isapi-loader

[4] https://www.w3.org/Jigsaw/Overview.html

[5] https://wiki.tcl-lang.org/page/AOLserver

incanus77 8 days ago | parent | prev [-]

Nah, you could just send a SIGHUP and not have to fully restart.

warothia 8 days ago | parent [-]

Oh! Did not know that, interesting. I guess they are more alike then.