httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akins, Brian" <Brian.Ak...@turner.com>
Subject Re: Some ramblings on httpd config
Date Tue, 09 Jun 2009 12:49:33 GMT
On 6/5/09 11:31 PM, "Graham Dumpleton" <graham.dumpleton@gmail.com> wrote:

> This last example wasn't even related to driving configuration. It was
> in practice an actual handler hook implementation for request
> processing, not configuration phases.

The way I see it, we have artificially separated configuration from request
processing.  If you squint and tilt your head just right, you can see that
virtualhosts today are really just syntactical sugar over the if/else logic
inside of core:

Some pseudo request processing code to do same thing:
 if listening_port == 80 then
     if r.hostname == 'www.foo.com' then
         ....
     elseif r.hostname =~ /www\d.bar.[org|net]/
     end
 end


Of course this could be further hidden from users with
macros/functions/libraries/modules...

Now, on the practical side, do we completely ditch the current config
system.  Part of me says yes, but I know that will be -1'd to death.  So,
I'd just like the ability to do something like this:

LoadModule lua_module mod_lua.so
Listen 80
LuaRequestHandler /path/to/my/lua/handler.lua

(or it can be inline <Lua> but have found that to be somewhat cumbersome)

Because I don't want to rewrite mod_proxy in lua, it'd be nice to have just
a little bit of glue that would allow me to use it in a more "scripty" sort
of way:

LoadModule proxy_module mod_proxy.so
LoadModule proxy_http_module mod_proxy_http.so
....
 require httpd.proxy -- provided by mod_proxy glue

 p = httpd.proxy.get_url('http://blah')


(Of course, that example could be handled like we do in mod_rewrite)

Currently, we can sorta do most request processing in lua. (FWIW, do the
request phases make any sense in a world where the entire request process is
handled by a "script"??)  What is missing is the glue to the other, useful
parts of httpd - like cache, mod_dbd, proxy, etc.

Sure, one of us could hack together some example glue here and there, but
until we as a whole "get" why this is useful/important, it will be just
another list of patches waiting to be reviewed.

-- 
Brian Akins
Chief Operations Engineer
Turner Digital Media Technologies


Mime
View raw message