Nsvs are, to me, global in essence. As such, I don't really see making
namespace aware as a good goal.
On the other hand, you can just use the namespace syntax with them:
server1:nscp 1> nsv_set myapp::myvarname mykey myvalue
myvalue
server1:nscp 2> nsv_get myapp::myvarname mykey
myvalue
Rather than "appname_nsvname", you can just use "appname::nsvname" and
achieve the same functionality. This seems more intuitive to me, since
the apps commands are expected to be in the namespace.
Rob Seeger
Zoran Vasiljevic wrote on 2/9/2005, 7:52 AM:
> On Wednesday 09 February 2005 11:13, Bas Scheffers wrote:
> > I have written down my first thoughts on how this could work at:
> >
> > http://bas.scheffers.net/wiki/14
> >
> > As you can see, it is not easy to do this quick and dirty as proof of
> > concept. It will require "application awareness" in many places
> (library
> > sourcing, ns_register_*) and changing the pageroot on the fly in every
> > request, based on what application is requested.
> >
> > Still, I don't believe it is too big a job.
> >
> > Looking forward to hear comments!
>
> "Applications must prefix the name of nsv variables with "appname_"
> to avoid seperate applications overriding each other's data."
>
> Why not rewrite nsv to be namespace-aware?
> Actually, this would be much more flexible for your proposal.
>
> Code executing the nsv command could lookup the variables
> in the current namespace and then in the global namespace.
> The thing is: this has only remotely to do with
> Tcl namespaces because of the compartment threading-model.
> Still namespace-aware nsv's seem doable on the first glance
> (maybe I'm wrong).
>
> Zoran
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to
> <[EMAIL PROTECTED]> with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the
> Subject: field of your email blank.
>
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.