httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <man...@io.com>
Subject Re: Proposal: new config API
Date Mon, 14 Jun 1999 06:21:48 GMT
On Sat, Jun 12, 1999 at 01:05:14AM -0700, Cliff Skolnick wrote:
> I would suggest that the config API have a call to check if any config info
> has changed, or possibly register a callback.  A dynamic config API with a
> standard way of change notification makes caching config info for
> performance easier.  This is a good addition to apache IMHO.

This'll be quite useful for mostly static configs. It won't be useful
for those sites using lots of dynamic DAV configuration. We could
allow partitioning the config directive space, and have separate flags
for each partition. Hmmm...

Maybe the config module can also return integers for each directive
registered, presumably hash indices. Then, every config lookup
wouldn't require a strncmp.

The calls I've thought of or heard from here so far (with
error-checking ignored for now):

int ap_init_config_module(pool/context)

void ap_register_config_directive(char *directive_name,
    ap_directive_arg_desc_t types_of_arguments, ...);

    This could include help text, and a partition identifier too.
    The unregister would be a pool cleanup

void ap_get_config_value(char *directive_name,
    ap_config_value_t **config_value);

void ap_get_config_value_from_hash(int directive_hash,
    ap_config_value_t **config_value);

ap_set_config_value(char *directive_name, 
    ap_config_value_t *config_value)

ap_set_config_value_of_hash(char *directive_name, 
    ap_config_value_t *config_value)

ap_check_changed(int partition_id);

So, are these things worth the effort and complexity:

- partitions with independant change notification
- hashed config directives
- Supporting XML node attributes (I forget the actual term that the
  XML geeks use) as in <blah tree="deciduous" food="tasty">
- Supporting limiting what scopes directives can be used in.

-- 
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/
"Some people have entirely too much free time on their hands."
  - Gene Spafford (spaf)

Mime
View raw message