Hi!

If you are going to that extent, why just not:

   ns_section section_name ?script?

so you are aotomatically backwards compatible.
Either you write:

    ns_section ns/fastpath {
         cache            false
         cachemaxsize     512000
    }

or omit the block and just default to
using ns_param.

Also, I believe that sections should nest:

   ns_section ns/some/section {
      param value
      ns_section my/section {
         param1 value1
      }
   }

where param and value are assigned to
  ns/some/section
and param1 and value1 are assigned to
  ns/some/section/my/section

I would't use namespaces for config storage
It be independent of Tcl interpreter as it
is used throughout the code and, the startup
interp gets trashed after startup anyway.

Cheers
Zoran

> For example instead of this (or it could be used at the same time,  
> it is
> not a replacement)
>
> ns_section      "ns/fastpath"
> ns_param        cache                   false
> ns_param        cachemaxsize            5120000
> ns_param        cachemaxentry           512000
> ns_param        mmap                    false
>
> it may look like this (still Tcl)
>
> section "fastpath" {
>      cache                   false
>      cachemaxsize            5120000
>      cachemaxentry           512000
>      mmap                    false
> }
>
> section "server/${servername}" {
>      connsperthread          0
>      flushcontent            false
>      maxconnections          100
>      maxthreads              10
>      minthreads              0
>      threadtimeout           120
> }
>
>
> As you can see this is Tcl command section
>
> proc section { name args } {
>
>     ns_section ns/$name
>     foreach { key val } $args {
>        ns_param $key $val
>     }
> }
>
> But config looks like more 21 century and more structured and  
> easier to
> read. Very similar to lighttpd by the way.
>
>
> -- 
> Vlad Seryakov
> [EMAIL PROTECTED]
> http://www.crystalballinc.com/vlad/
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a  
> browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> naviserver-devel mailing list
> naviserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/naviserver-devel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to