httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@leland.Stanford.EDU>
Subject Re: Modules in own address space.
Date Sun, 23 Nov 1997 20:02:40 GMT
On Sun, 23 Nov 1997, Ben Hyde wrote:

> I'm building a plugin to Apache, and I seem to be
> swallowing a bigger project than I expected.  I thought
> I'd share the pain a little.

Hey, that's what we're here for :)

[...]

> All that tends to lead one toward an plugin API design that
> uses a transport layer between Apache and the plugin that
> is stream like (possibly using shared memory) and is able
> to manage to keep the satilite and Apache in synch around
> the request/server data structures.

[...]

> Have other people climbed out on this limb or something
> similar?

If I understand what you're saying, I think I have. When I wrote mod_jserv
(which lets Apache run Java servlets), it was neccessary to have the part
of the module that's written in Java be external to Apache, not only
because the JNI embedding thing doesn't work very well on all OSes (and
I'm not sure I'd want a Java interpreter in each and every Apache
process), but because we wanted all servlets to run in the same process,
so the Java multithreading thing would work out right.

So I used an idea I stole from Sun's mod_servlet, which they stole from
FastCGI. Basically, there's a process running that actually generates
content. An Apache module receives a request, opens a socket (or already
has one open) to this process, gives it the data about the request, gets
the content back, and feeds it to Apache.

It isn't the greatest model, and there are certainly some problems with it
in a number of ways, but for the most part, it works.

-- Alexei Kosut <akosut@stanford.edu> <http://www.stanford.edu/~akosut/>
   Stanford University, Class of 2001 * Apache <http://www.apache.org> *



Mime
View raw message