httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@ai.mit.edu (Robert S. Thau)
Subject My garage project...
Date Mon, 12 Jun 1995 21:14:03 GMT
Over the past few weeks, I've been off on a garage project to explore
some possible new directions I thought *might* be useful for the group
to pursue.  For most of that time, I haven't actually had any useful
code to talk about, so I haven't talked much about it.  This weekend I
finally got something which works, though, for at least half an hour
at a time, so I feel a little more comfortable showing it in public.

(FWIW, I certainly don't want this thing to immediately replace 0.7.x,
and even though I was running it on port 80 yesterday (it held up for
a while, but went stale eventually), I can't yet recommend that to
anyone else --- it's still alpha code.  However, I do think it
represents a direction, or at least some ideas, which the group might
want to pursue).

What I have right now is a server I'm calling Shambhala.  My current
code is at ftp://ftp.ai.mit.edu/pub/users/rst/shambhala1.tar.Z;
there's a README file in the tarchive which says what's believed to
work (basically, the stuff that's in use here, and is tested by my
usual round of preinstall server tests), and what's still suspect.
(One omission of particular note, in this release, is virtual hosts
--- I could slap something together fairly quickly in which each
virtual host had its own set of config files; emulating the current
Apache setup would be a little more work, but it's doable).

The basic idea of Shambhala is to make a modular "tinkertoy" server,
to which people can easily add code which is valuable to them (even if
it isn't universally useful) without hairing up a monolithic server.
Applications for this idea include database integration, support for
experimental search and scripting extensions, new authentication modes
(digest authentication, for instance, could be done entirely as a
Shambhala module), and so forth.    

In particular, the following are modules in the current Shambhala
code: common log format (other loggers can easily coexist with it),
auth and dbm auth (although both use common code in http_protocol.c to
parse the Authorization: line), directory handling, CGI, server-side
includes, handling of aliases and access control, content negotiation,
and some other stuff.  (What's left in the basic server?  Not a whole
lot).  Most of this stuff even works when I try it (though I have to
admit I'm still a tad worried about what happens when I turn my back
;-).

(The configuration file commands which configure these things are
defined, for the most part, by the modules themselves, and not by the
server core --- each module has, or can have, a command dispatch
table).

Besides carving up the base code into modules, Shambhala makes a few
other fairly pervasive changes.  Most of the global variables are
gone; most of the MAX_STRING_LENGTH char arrays are gone (the few that
are left being sprintf() targets, or I/O buffers of various sorts),
and unmunge_name has vanished.  The most drastic change is the use of
a "compool" strategy to manage resources allocated for a request ---
the code in alloc.c keeps track of it all and allows it to be freed en
bloc at the end of the request.  As I said before, *something's* still
leaking, but assuming we can track it down, I really do think that
this style results in cleaner code, if only because you don't have to
obsessively track down and explicitly free() every last byte of
allocated storage.

So anyway, it's there, and the group is welcome to it.  I hope people
have fun with it.

rst


Mime
View raw message