Using TCL packages solves a lot of the problems, however there are some
issues that need to be managed within an nsd. I have a number of
AOLservers instances that have a very minimum init file and a single
tcl modules file that only has a single "package require" to start,
load (TCL and binary packages), and initialize a complete AOLserver
instance. The "issue" is that the package information, (both TCL and binary) is stored within the TCL binary code and the AOLserver cloning does not maintain it. I have written an ns_package package :-) that overrides the TCL package command to track this information and updated it when a new interp is created. This works with both 4.0.10 and 4.5. The packages loaded must be thread safe to work. I have used, tdom, curl, and home grown and 3rd party TCL and binary packages. It also handles the automatic calling of package procedures during server startup and shutdown if they are defined in the package. {package}::nsInit is called immediately after the package is loaded, {package}::nsPostInit is called (in load order) after the server startup has completed and a fully defined interp is ready. {package}::nsShutdown is called (in reverse load order) at server shutdown. In 4.5, it could also be set to call procedures are interp allocate, conn, conn close, and deallocate. Modules could easily (I think) be converted to packages. Some people (just trying to get it on the table for discussion) do not like the fact that I overloaded the TCL package command, but I think it makes the integration and management of third party packages easier and natural. Jay Rohr Tom Jackson wrote: Nobody can argue that better isn't better. There are certain things which seem difficult in AOLserver, maybe more difficult than they should be, but maybe not.One is writing a new C module. I've done some where I use a shared .so module for the interesting library code, and I think I have used a static .la (or whatever it is) file. The difficulty seems to be in using the Tcl C API to make a place to store application data, like handle pointers, etc. Maybe this is just as hard in Apache? Being able to more easily reuse existing C libraries would provide a long term benefit. Maybe this would be easier with ns_proxy and a single threaded/isolated process. Another issue related to C modules is that you can load libnsd into a tcl interp, or just run nstclsh. But you can't load modules, or at least I don't know how to do it. It would probably take a lot of work to get nsd to run as a server inside a tclsh, but what about being able to run nsd with no servers, maybe with Tk as the face of the process, maybe a new main function called nstk. Seems complicated to do, maybe just a module needs to be written that could startup a Tk thread? Being able to use the database and scheduling APIs in a desktop application would be an intesting new area for the AOLserver codebase. Maybe there is something already in this area with Tcl/Postgres/Oracle/etc? tom jackson On Thursday 09 August 2007 11:28, Daniël Mantione wrote:Besides this, AOLserver needs to get better in replacing Apache as the primary web server on a system, and this means getting multi-user capabilities itself. Depending on the way it is done, it can be low hanging fruit too.-- 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.
|
begin:vcard fn:Jay J. Rohr n:Rohr;Jay email;internet:[EMAIL PROTECTED] x-mozilla-html:TRUE version:2.1 end:vcard