Index: openacs-4/packages/acs-core-docs/www/bootstrap-acs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/bootstrap-acs.html,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-core-docs/www/bootstrap-acs.html 28 Feb 2003 05:36:04 -0000 1.9 +++ openacs-4/packages/acs-core-docs/www/bootstrap-acs.html 24 Jun 2003 03:58:11 -0000 1.10 @@ -1,11 +1,11 @@ -Bootstrapping OpenACS

Bootstrapping OpenACS

+Bootstrapping OpenACS

Bootstrapping OpenACS

by Jon Salz
- OpenACS docs are written by the named authors, but may be edited + OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

  • Tcl code: /tcl/0-acs-init.tcl and /packages/acs-kernel/bootstrap.tcl

This document describes the startup (bootstrapping) process for an AOLserver running OpenACS. -

The Big Picture

+

The Big Picture

Before OpenACS 3.3, the OpenACS startup process was extremely simple: after AOLserver performed its internal initialization (reading the configuration file, loading shared libraries and module code, etc.) it scanned through the Tcl @@ -19,7 +19,7 @@ and *-init.tcl files.

This document examines in detail each of the steps involved in AOLserver/OpenACS startup. -

The Startup Process

+

The Startup Process

As soon as the nsd daemon is executed by the init process (or otherwise), AOLserver reads its configuration file and chroots itself if necessary. It then loads shared libraries @@ -34,11 +34,11 @@ by trimming the final component from the path to the Tcl library directory (/web/yourservername/tcl). But 0-acs-init.tcl's has an important function, namely sourcing -/packages/acs-core/bootstrap.tcl, which does the following:

  1. Initialize some NSVs used by the core. These NSVs are +/packages/acs-core/bootstrap.tcl, which does the following:

    1. Initialize some NSVs used by the core. These NSVs are documented in /packages/acs-core/apm-procs.tcl - no need to worry about them unless you're an OpenACS core hacker. -

    2. Verify the deletion of obsolete OpenACS files. The +

    3. Verify the deletion of obsolete OpenACS files. The /tcl directory has evolved quite a bit over the months and years, and a few files have come and gone. The /www/doc/removed-files.txt file contains a list of files which @@ -47,18 +47,18 @@ bootstrap.tcl scans through this list, logging error messages to the log if any of these files exist. -

    4. Source *-procs.tcl files in the OpenACS core. +

    5. Source *-procs.tcl files in the OpenACS core. We source each file matching the *-procs.tcl glob in the /packages/acs-kernel directory, in lexicographical order. These procedure are needed to perform any of the following steps. -

    6. Ensure that the database is available by grabbing and +

    7. Ensure that the database is available by grabbing and releasing a handle. If we can't obtain a handle, we terminate initialization (since OpenACS couldn't possibly start up the server without access to the database). -

    8. Register any new packages in the /packages -directory. In each directory inside /packages, we look +

    9. Register any new packages in the /packages +directory. In each directory inside /packages, we look for a .info file; if we find a package that hasn't yet been registered with the package manager (i.e., it's been copied there manually), we insert information about it into the database. (The first time @@ -68,23 +68,23 @@ initially disabled; they must be manually enabled in the package manager before they can be used. -

    10. Ensure that the acs-kernel package is -enabled. If the OpenACS core isn't initialized, the server +

    11. Ensure that the acs-kernel package is +enabled. If the OpenACS core isn't initialized, the server couldn't possibly be operational, so if there's no enabled version of the OpenACS core we simply mark the latest installed one as enabled. -

    12. Load *-procs.tcl files for enabled -packages, activating their APIs. +

    13. Load *-procs.tcl files for enabled +packages, activating their APIs. -

    14. Load *-init.tcl files for enabled packages, +

    15. Load *-init.tcl files for enabled packages, giving packages a chance to register filters and procedures, initialize data structures, etc. -

    16. Verify that the core has been properly initialized by +

    17. Verify that the core has been properly initialized by checking for the existence of an NSV created by the request processor initialization code. If it's not present, the server won't be operational, so we log an error.

    At this point, bootstrap.tcl is done executing. AOLserver proceeds to source the remaining files in the /tcl directory (i.e., unpackaged libraries) and begins listening for connections. -

    ($Id$)
View comments on this page at openacs.org
+

($Id$)
View comments on this page at openacs.org