3 ms·
>the classic Apache-style paradigm was to have "the server" be generic and explicitly support certain application languages The first wave was cgi-bin based fo
by tyingq 5y ago
>the classic Apache-style paradigm was to have "the server" be generic and explicitly support certain application languages
The first wave was cgi-bin based fork() and exec() a process.
Followed by what you're describing...things like mod_perl and mod_php, where the app code was running inside the apache process.
Then, later, a separate daemon that kept some pool of processes running for apache to open up connections to, like fastcgi.
- brundolf 5y agoI wonder- was this the de-facto pattern because at the very beginning a "web server" was just a static file server? So these hooks for handling requests dynamically were just an extension on top of that?
- tyingq 5y agoFor everyone other than people on .gov, .mil and .edu campus networks, the internet was dog slow anyway, so fork() and exec() wasn't a problem. Given the low traffic, it was probably also better for overall memory utilization. Memory was more precious than CPU cycles, and fairly limited if you didn't want a lot of swapping. At the time, most stuff worked like that from inetd. It would listen on lots of ports and fork off the right program for the incoming connection, then that process would exit when it was done. Long running daemons and lots of processes weren't as common. The common pattern prior to that was people logging in, reading already synced newsgroups, editing stuff, compiling, logging off, etc. Transient processes that went away.
- tksb 5y ago> The first wave Whoa. This is what made me feel old for the first time, ha!
- _jal 5y agoTimeline-wise fastcgi was a thing at the same time that in-process interpreters were popular. I remember implementing a dumb polling feature as fastcgi in 1998 or thereabouts. (We were also running the Netscape web server, because we depended on a plugin for it to insert inventory from our NetGravity ad server. And boy now I feel old.)
- tyingq 5y agoThey did overlap in existence, but at least in my world, nsapi/fastcgi connections to a pooled app server wasn't as popular until later. I think because in the beginning, both nsapi and fastcgi rolled out with commercial, non-free web servers. There wasn't a free fastcgi capability for Apache until 1999 or so, where mod_perl was around since 1996, I think.