httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Nick Hibma)
Subject Re: letting modules specify startup code
Date Mon, 26 Feb 1996 12:51:55 GMT

..>From Mon Feb 19 07:32:25 1996
..>Date: Sun, 18 Feb 1996 22:32:56 -0800 (PST)
..>From: Brian Behlendorf <>
..>Subject: letting modules specify startup code
..>Mime-Version: 1.0
..>We're working on a custom module to do user authentication based on records
..>in an Oracle database.  Since the database is on a separate machine, the
..>model is "open connection, perform query, close connection"  - but obviously
..>that is a painful thing to do if you're trying to design a fast system with
..>low latency.  What I'd like to be able to do is have "open connection" 
..>happen at the beginning of a child's life, have the fd for the connection
..>always available, and then do the "close connection" at the end of the
..>child's life.  It doesn't *appear* that the Apache API allows for modules to
..>specify some chunk of code to be performed at startup, so before we go off
..>hacking this into http_main.c or wherever, does anyone have some good ideas
..>about generalizing this?  Is this a whack model?

I ran into the same problem; we hacked the http_main.c to include two
extra inits, one every time a directory in access.conf is closed; as to
do verification wether all (msql) params are there and valid, and one
for init/close of each child. I could not quite see a neat way of doing
this as, to be honest, I do not understand the DL part of the module

But I do think the following hooks/vectors would be valuable:

	- mother init + shutdown 
	- child init + shutdown ( on both sides of the fork)
	- access/conf file open and close

Unless this is too costly. My understanding is that it is *not* if
there are no calls.



View raw message