On 11/13/2012 10:08 AM, Marco Pallante wrote:
No, definitely. You would waste a lot of the server resources. [...]

That's what I expected, but not knowing Apache behavior it worth
asking.

If SeparateVirtualInterps is off (default) you have one interpreter in each
child process, therefore the global namespace is shared even when your
applications store data in their own namespaces. If the flag is 'on' each
virtual hosts gets a slave interpreter and it will have its own global
namespace.

Here what I need. I was hoping for separate interpreters for each virtual
host, but that's not the default.

It's just a default value. There is no point in calling something a 'default value' if you can't change it :-) So set it as you wish at the global level in the conf

RivetServerConf SeparateVirtualInterps on

see http://tcl.apache.org/rivet/manual/directives.html


In my framework, I was thinking about loding *all* the framework code
inside the global namespace (and child namespaces), so that it happens
once per virtual host/child pair.

With the default value, I can't do that safely, because each vh could
run a different site, with possible different version of the framework, or
different code sharing the same names.

Is there a way to programmatically check the value of SeparateVirtualInterps?
I could implement a namespace switching features, which uses the
global namespace if the option is true, so it's safe to put stuff there, or
uses the ::request namespace if the option is false.



As I said you can change this flag and restart your server. If you need to know this directive value you can call the 'inspect' command (rivet 2.1.0, not existing in 2.0). See the docs shipped in the tar archive.

 -- Massimo


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org

Reply via email to