Attached is a sample implementation (bare-bones)
of a configuration managment module, similar to
the built-in ns_config but with read/write caps.
Not all commands have been implemented.
The only one visible command in Tcl API is: ns_conf.
It accepts two sub-commands:
ns_conf put my/section theparameter paramvalue1
which will set theparameter to paramvalue1 in
the my/section, creating the section (and the
parameter if needed)
ns_conf get my/section
ns_conf get my/section theparameter
which will return all sections, all parameters and
value of the given parameter respectively.
There is no persistence at this point.
This may/will be added later on.
To compile, unpack in the root of the server
distribution, then change to nsconf directory
and invoke "make". Then add nsconf.so module
to the server config file.
Emphasis during the development was on minimal
locking for multiple readers. Writers are not
fast. Readers are pretty fast. Per design,
readers will content mostly with one writer
hence the locking overhead is at absolute minimum.
Comments are welcome.