This file is obsolete. See README.html for a more up-to-date list. DANGER --- ns_set_clear in ns_set.c breaks with Apache ALLOC_USE_MALLOC. WARNING --- this will open a lot more connections to your database than the real aolserver, since each server process (and the scheduler process) has a separate copy of the pools. Tcl incompatibilities and limitations, in stuff which isn't just absent; I don't detail those because I *think* I've included every function which is actually invoked by ACS. For a list of functions which we have simply ditched, see tclcmds.c; it includes functions that deal with server sockets (ns_socklisten, ns_accept, etc.), all the cache stuff, the thread creation and synchronization primitives (ns_thread, ns_mutex, ns_cond, etc.), anything dealing with the control socket (ns_cport, etc.), and a hodgepodge of system-level miscellany (ns_rollfile, ns_fork, etc.), and probably other stuff I've just forgotten about. (Well, actually, ns_mutex isn't technically absent; it's replaced with a no-op stub which ignores all arguments --- this is necessary to get ACS running, and I do it there only because I really think the mutex isn't needed there anyway, so long as filters aren't being redefined after configuration --- and if they are, we have bigger problems). I do not discuss limitations in the C API (other than to briefly state that the thread synchronization stuff doesn't exist there either, and is generally #ifdeffed out in the code I've copied over); for that, you're on your own, though database drivers that don't mess with the innards of ns_sets *shouldn't* be much work. General: At server restart, all state is reinitialized from scratch. Accordingly, "started_p" flags should not be necessary. On the other hand, restart currently just blows up anyway trying to unload the shared libraries, so this is at least momentarily a non-issue. ns_schedule_XXX --- only works during startup. Note that, as discussed below, mod_aolserver shares a lot less between threads than the real thing, and restricts many more functions to run only during server startup. To get around this, any procedure scheduled as: ns_schedule_proc -once secs my_startup_func where "secs" is less than 120 (two minutes) will actually be run in the parent process, after the database is configured (so they can read the database), but before any child processes are created (so, e.g., ns_register_filter/proc will still work). These will be run in the order of the scheduled intervals given, so if we have ns_schedule_proc -once 30 initialize_hairy_stuff ns_schedule_proc -once 2 initialize_really_basic_stuff "initialize_really_basic_stuff" is guaranteed to run first, no matter in what order the two were scheduled. [Yes, this does involve the parent process closing all database handles, and the children reopening them...] ns_cancel, ns_pause, ns_resume, ns_unschedule_proc are not supported. Supporting these, and supporting ns_schedule_proc in response to web requests, would not actually be *terribly* hard (we could mirror the list of procs in an nsv array, and have the scheduler reload it on a signal --- this wouldn't happen often enough for performance to be an issue), but I don't *think* there's a pressing need. ns_register_filter/proc --- Only work during configuration, or during "scheduled startup procedures". Fixing this would be real work, though not impossible; our nsv implementation isn't nearly fast enough to perform acceptably for access to the shared state, so we'd have to do something with Engelschall's MM. (And no, an MM-based nsv isn't worth it just for the sake of this; Berkeley db would be just so much easier). Preauth filters run before postauth filters, but after Apache auth. ns_share --- ns_share variables do persist across requests, and are inherited from configuration (and "scheduled startup procedures") by request-handling threads, and the scheduler thread. However, they are *not* shared among interpreters; for that, use nsv. Some of the alerter and memoization stuff is known to trip over this. nsv: Only supported commands are nsv_get, nsv_set, nsv_unset, nsv_exists, nsv_array names, nsv_array exists, nsv_append. Each one opens and closes a GDBM file, which means they're a lot slower than they have to be; I don't *think* this is likely to be a bottleneck, but we'll see. (If it is, we should switch to Berkeley db, which does the internal locking necessary to support multiple writers simultaneously; that should be adequate for anything that isn't trying to use these as a substitute for ordinary tcl variables). ns_info --- Pageroot is taken from aolerver config, not Apache config. ns_info log is a potentially inaccurate guess; if the administrator has configured pipe logs, a physical log file may not even *exist*... ADP --- no debugging support; fancy parser is the only one supported (don't bother trying to declare others in the config file); its features should work, though (register_tag and ns_adp_parse are tested). ns_conn --- the authpasswd, contentlength, and protocol subcommands are not supported. ns_conn url takes off PATH_INFO. This may be incompatible. ns_url2file --- again, takes off PATH_INFO. This may be incompatible. ns_server --- active subcommand is presently stubbed, always returning "". Other subcommands are unsupported. We could use Apache's extended status features to do this *about* right; long URLs would be clipped. (With a higher-performance nsv implement- ation, we could also do it for ourselves on the side). ns_atclose --- Does not work in scheduled procedures (though this would be trivial to add if needed). ns_configsections --- not supported. ns_configsection --- the set implementing the config section for ns/foo/bar won't show up as the bar element of ns_configsection foo ns_set --- ns_set -persist is only supported during configuration ns_set split is not supported. ns_returnfile --- does not do if-modified-since. This is a bug. ns_geturl --- Just invokes ns_httpget. Does not return headers; does follow redirects; will time out. There is one invocation of this in ACS; I'd like to see it ditched and drop the one line of support, just to nuke the redundancy. ns_modlog --- Everything goes to the error log; you can't be specific about facilities and logging thresholds, though they are put into the log. The command is stubbed and does nothing. ns_checkurl/ns_requestauthorize: stubbed. The commands do nothing, and always return OK.