From: Stephen D. <sd...@gm...> - 2006-09-07 19:50:17
|
On 9/7/06, Vlad Seryakov <vl...@cr...> wrote: > > > > It isn't a dummy server, it's needed. The current example-config.tcl > > is wrong in a number of respects, for example this comment: > > > > # > > # Server-level configuration > > # > > # There is only one server in naviserver, but this is helpful when multiple > > # servers share the same configuration file. This file assumes that only > > # one server is in use so it is set at the top in the "server" Tcl variable. > > # Other host-specific values are set up above as Tcl variables, too. > > # > > > > There isn't only one server! All Tcl commands and procs *have* to run > > in the context of a virtual server, even if there's only one. > > I can put it in other words: there is always virtual server in > NaviServer, if not defined in config file, internal server "default" is > used instead. It is impossible to run nsd without virtual server, so > instead of exiting with error internal server is used. > > I am not insisting on doing it the way i did but it seemed to me very > logical and not breaking overall NS architecture or model. > > But of course, suggestions are welcome, this is development version > under discussion. The stuff about virtual servers in the config file just isn't hard. And the problem with hiding them is that it really gives people the wrong mental-model about how things work. > > Yes, you can have global modules. But not if they register Tcl > > commands! Which virtual server context do they run with? > > > > I guess you could write a module such that when it's loaded globally, > > it roots around for all virtual servers and adds it's Tcl commands to > > each. But they don't do that... > > > > The idea of creating a default virtual server magically hides this > > important distinction, which makes it harder over all for people to > > understand what's going on. > > This part actuall out of sync with overall NS model and logic, the only > module that does it is nssock and it was made so for enabling host based > virtual server support. I think this is ill and needs to be removed or > re-build, if we always have virtual server, its nssock can do host > mapping, no need to load it globally and global modules should be > eliminated. Hmm, not sure. The nsdb module is also a global module. But it's kinda weird... |