#65 Read/write configuration storage

Feature Request
open
None
1
2006-12-01
2006-08-31
Zoran Vasiljevic
No

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:

get
put

So:

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)

or

ns_conf get
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.

Discussion

  • First (preliminaty and incomplete) implementation

     
    Attachments
  • Stephen
    Stephen
    2006-12-01

    • milestone: --> Feature Request
    • priority: 5 --> 1