You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by mx...@apache.org on 2012/10/01 18:52:39 UTC

svn commit: r1392441 - in /tcl/rivet/branches/2.1: ./ doc/ doc/images/ doc/xml/

Author: mxmanghi
Date: Mon Oct  1 16:52:39 2012
New Revision: 1392441

URL: http://svn.apache.org/viewvc?rev=1392441&view=rev
Log:
    * doc/xml/request.xml,doc/xml/install.xml: attempting to improve the documentation
    * doc/images/: Adding missing icons
    * Changelog: merging from trunk before feature freeze for 2.1


Added:
    tcl/rivet/branches/2.1/doc/images/acrobat.png
      - copied unchanged from r1392440, tcl/rivet/trunk/doc/images/acrobat.png
    tcl/rivet/branches/2.1/doc/images/disk.png
      - copied unchanged from r1392440, tcl/rivet/trunk/doc/images/disk.png
    tcl/rivet/branches/2.1/doc/images/qbullet-note.png
      - copied unchanged from r1392440, tcl/rivet/trunk/doc/images/qbullet-note.png
    tcl/rivet/branches/2.1/doc/images/remote.png
      - copied unchanged from r1392440, tcl/rivet/trunk/doc/images/remote.png
    tcl/rivet/branches/2.1/doc/images/scrollup.png
      - copied unchanged from r1392440, tcl/rivet/trunk/doc/images/scrollup.png
    tcl/rivet/branches/2.1/doc/images/word.png
      - copied unchanged from r1392440, tcl/rivet/trunk/doc/images/word.png
Modified:
    tcl/rivet/branches/2.1/ChangeLog
    tcl/rivet/branches/2.1/doc/   (props changed)
    tcl/rivet/branches/2.1/doc/rivet.css
    tcl/rivet/branches/2.1/doc/xml/install.xml
    tcl/rivet/branches/2.1/doc/xml/request.xml

Modified: tcl/rivet/branches/2.1/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/ChangeLog?rev=1392441&r1=1392440&r2=1392441&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/ChangeLog (original)
+++ tcl/rivet/branches/2.1/ChangeLog Mon Oct  1 16:52:39 2012
@@ -1,8 +1,13 @@
+2012-10-01 Massimo Manghi <mx...@apache.org>
+    * doc/xml/request.xml,doc/xml/install.xml: attempting to improve the documentation
+    * doc/images/: Adding missing icons
+    * Changelog: merging from trunk before feature freeze for 2.1
+
 2012-09-30 Massimo Manghi <mx...@apache.org>
     * tests/parsepackage.test: changed path to librivetparser.so
 
 2012-09-29 Massimo Manghi <mx...@apache.org>
-    * branches/2.1: branching trunk as branches/2.1
+    * rivet/rivet-tcl/xml.tcl: Adding command for simple quick XML fragments generation
 
 2012-09-22 Massimo Manghi <mx...@apache.org>
     * rivet/packages/dio/dio.tcl: various methods used as

Propchange: tcl/rivet/branches/2.1/doc/
------------------------------------------------------------------------------
  Merged /tcl/rivet/trunk/doc:r1391832-1392440

Modified: tcl/rivet/branches/2.1/doc/rivet.css
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/doc/rivet.css?rev=1392441&r1=1392440&r2=1392441&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/doc/rivet.css (original)
+++ tcl/rivet/branches/2.1/doc/rivet.css Mon Oct  1 16:52:39 2012
@@ -168,54 +168,54 @@ HTML>BODY P {
 
 /* Add an external-link icon to absolute links */
 a[href^="http:"] {
-        background: url(images/remote.gif) right center no-repeat;
+        background: url(images/remote.png) right center no-repeat;
         padding-right: 12px;
 }
 
 a[href^="http:"]:hover {
-        background: url(images/remote_a.gif) right center no-repeat;
+        background: url(images/remote.png) right center no-repeat;
 }
 
 /* Add a note icon to footnote links */
 a[href^="#FTN"] {
-        background: url(images/qbullet-note.gif) right center no-repeat;
+        background: url(images/qbullet-note.png) right center no-repeat;
         padding-right: 12px;
 }
 
 a[href^="#FTN"]:hover {
-        background: url(images/qbullet-note_a.gif) right center no-repeat;
+        background: url(images/qbullet-note.png) right center no-repeat;
 }
 
 /* ...and a back icon to the backlinks in the footnotes themselves */
 a[name^="FTN"] {
-        background: url(images/scrollup.gif) right center no-repeat;
+        background: url(images/scrollup.png) right center no-repeat;
         padding-right: 12px;
 }
 
 a[name^="FTN"]:hover {
-        background: url(images/scrollup_a.gif) right center no-repeat;
+        background: url(images/scrollup.png) right center no-repeat;
 }
 
 /* Add a download icon to .gz links */
 a[href$=".gz"],a[href$=".tar"],a[href$=".zip"] {
-        background: url(images/disk.gif) right center no-repeat;
+        background: url(images/disk.png) right center no-repeat;
         padding-right: 12px;
 }
 
 
 /* Add an Acrobat Reader icon to PDF links */
 a[href$=".pdf"] {
-        background: url(images/acrobat.gif) right center no-repeat;
+        background: url(images/acrobat.png) right center no-repeat;
         padding-right: 12px;
 }
 
 a[href$=".pdf"]:hover {
-        background: url(images/acrobat_a.gif) right center no-repeat;
+        background: url(images/acrobat.png) right center no-repeat;
 }
 
 /* Add a Word icon to RTF links */
 a[href$=".rtf"] {
-        background: url(images/word.gif) right center no-repeat;
+        background: url(images/word.png) right center no-repeat;
         padding-right: 12px;
 }
 

Modified: tcl/rivet/branches/2.1/doc/xml/install.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/doc/xml/install.xml?rev=1392441&r1=1392440&r2=1392441&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/doc/xml/install.xml (original)
+++ tcl/rivet/branches/2.1/doc/xml/install.xml Mon Oct  1 16:52:39 2012
@@ -1,285 +1,205 @@
 <section id="installation">
     <title>Apache Rivet Installation</title>
     <procedure>
-      <step>
-        <title>Check Dependencies</title>
-        <para>
-            To install Rivet 2.1.0, you will need Tcl 8.5 or greater and the Apache HTTP server version 2.2.x. 
-            It is known to run on Linux, FreeBSD, OpenBSD, Solaris and HPUX. Windows NT is also possible
-            - please see the directions in the distribution. 
-			</para>
-			<para>
-				<note>
-					Check your Apache installation for
-	         	Rivet requires Apache HTTP Webserver to run 
-	         	prefork as mpm.
-	         </note>
-			</para>
-         <para>
-            If you're building Apache yourself from sources be careful to specify 
-            <command>--with-mpm=prefork</command> when running ./configure. 
-            Rivet doesn't support the run time mpm specification available in the Apache 2.3
-            development version.
-        </para>
-      </step>
-      <step>
-        <title>Get Rivet</title>
-        <para>
-          Download the sources at <ulink url="http://tcl.apache.org/rivet/static/download.html"/>.  Currently
-          the only way to obtain Rivet.  In the future, we hope to have a FreeBSD port, Debian package, RPM's, and windows
-          binaries.
-        </para>
-      </step>
-      <step performance="required">
-        <title>Install Tcl</title>
-        <para>
-          If you don't have <ulink url="http://www.tcl.tk">Tcl</ulink> already, you need it!  
-          If you already have it, you should just be able to use your system Tcl as
-          long as it is recent.  You can tell Rivet build scripts where Tcl is via
-          the <option>--with-tcl</option> option to <command>configure</command> (see below).
-        </para>
-      </step>
-      <step performance="optional">
-        <title>Get and Install Apache Sources</title>
-        <para>
-              Rivet needs some Apache include (.h) files in order to build.  The easiest way 
-          to get them is to download the source code of the Apache web server, although some systems
-          (Debian GNU/Linux for example) make it possible to install only the headers and other 
-          development files.  If you intend to build Rivet statically (compiled into the Apache web
-          server instead of loaded dynamically), you definitely need the sources.  
-            We recommend that you build Rivet as a loadable shared library, for maximum flexibility,
-            meaning that you also build Apache to be able to load modules. Other than that, 
-            the default Apache install is fine.  We will tell Rivet where it is located via the 
-            <option>--with-apxs</option> option to <command>configure</command> (see below).
-        </para>
         <para>
-              The source code for the Apache web server may be found by
-              following the links here: <ulink
-              url="http://httpd.apache.org/"/>.
+            Check your OS website for a binary package of Apache Rivet. 
+            Rivet 2.1 runs with the Apache Apache 2.2.x and 2.4.x server. 
+            It is known to run on various Linux distributions 
+            (Debian &amp; Ubuntu, Redhat, SuSE and CentOS), FreeBSD and OpenBSD.
+            Currently there is no way to run Apache Rivet on Windows&copy; with Apache 2.2, since 
+            no <ulink url="http://httpd.apache.org/docs/2.2/mpm.html">Multi-Processing Module</ulink>
+            other than
+            <ulink url="http://httpd.apache.org/docs/2.2/mod/prefork.html">prefork</ulink> is supported.
+            Efforts are under way to extend the support to the 
+            <ulink url="http://httpd.apache.org/docs/2.2/mod/worker.html">worker</ulink> MPM, which could
+            open the possibility to run Apache Rivet also with the 
+            <ulink url="http://httpd.apache.org/docs/2.2/mod/mpm_winnt.html">winnt</ulink> MPM.
         </para>
-    </step>
-    <step>
-        <title>Uncompress Sources</title>
         <para>
-          We will assume that you have Apache installed at this point.
-          You must uncompress the Rivet sources in the directory where you
-          wish to compile them.
-
-          <programlisting>gunzip rivet-X.X.X.tar.gz
-tar -xvf rivet-X.X.X.tar.gz</programlisting>
-
+            If you need to compile Apache Rivet yourself this is the procedure to follow
         </para>
-    </step>
-    <step>
-	    <title>Building Rivet</title>
-	    <substeps>
-	    <step>
-	        <para>
-              On Linux or Unix systems, Rivet uses the standard <command>./configure ; make ; make install</command> technique.
-            </para>
+        <step performance="required">
+            <title>Install Tcl</title>
             <para>
-              There are several rivet specific options to configure that might be useful (or needed):
-              <variablelist>
-            <varlistentry>
-              <term>--with-tcl</term>
-              <listitem>
-                <para>
-                  This points to the directory where the
-                  <filename>tclConfig.sh</filename> file is located.
-                </para>
-              </listitem>
-            </varlistentry>
-            <varlistentry>
-              <term>--with-tclsh</term>
-              <listitem>
-                <para>This points to the location of the
-                  <filename>tclsh</filename> executable.</para>
-              </listitem>
-            </varlistentry>
-            <varlistentry>
-              <term>--with-apxs</term>
-              <listitem>
-                <para>The location of the <filename>apxs</filename>
-                  program that provides information about the
-                  configuration and compilation options of Apache modules.
-                  The name of this program varies depending on how Apache was
-                  packaged. For examples Debian Apache 2.2 packagers chose
-                  to rename apxs to allow cohexistence with Apache 1.3.
-                  <programlisting>--with-apxs=/usr/bin/apxs2</programlisting>
-                  SuSE apxs includes also the MPM name for which Apache was compiled
-                  <programlisting>--with-apxs=/usr/sbin/apxs2-prefork</programlisting>
-                </para>
-              </listitem>
-            </varlistentry>
-            <varlistentry>
-              <term>--with-apache-version=[1|2]</term>
-              <listitem>
-                <para>
-                This option tells the build scripts whether you want to build Rivet for the
-                Apache 1.x or Apache 2.x server.
-                </para>
-              </listitem>
-            </varlistentry>
-            <varlistentry>
-              <term>--with-apache-include[=DIR]</term>
-              <listitem>
-                <para>
-                    Locates the Apache include files on your computer, if they're not in standard directory. 
-                </para>
-              </listitem>
-            </varlistentry>
-            <varlistentry>
-              <term>--enable-version-display=[yes|no] (default: no)</term>
-              <listitem>
-                <para>
-                This option enables Rivet to display its version in the logfiles when Apache is started. 
-                The default is to keep Rivet version hidden.
-                </para>
-              </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>--with-rivet-target-dir=DIR</term>
-               <listitem>
-                    <para>
-                    This option tells the install script where Rivet's Tcl packages have to be copied. 
-                    </para>
-               </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>--with-upload-dir=DIR (default: '/tmp')</term>
-                <listitem>
-                    <para>
-                        Sets the default directory where Rivet stores files in an upload 
-                        operation. (Can be changed in the conf with the parameter 'UploadDirectory',
-                        see )
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>--enable-head-request (default: 'no') </term>
-                <listitem>
-                    If enabled returns the real headers in response to a HEAD http request. (Can
-                    be changed in the configuration with the 'HonorHeaderOnlyRequests' parameter)
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>--enable-virtual-interps-separation (default: 'no')</term>
-                <listitem>
-                    When enabled each virtual host will have its own interpreter. (Can be changed in the
-                    configuration with the 'SeparateVirtualInterps' parameter)
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>--with-post-max=BYTES Maximum size of data in a POST (default: 0=unlimited)</term>
-                <listitem>
-                   Form data are sent to the server in either a GET or a POST operation. Data in POST
-                   can be large and you can set the default maximumx size of data that can be accepted
-                   in a POST. (Can be changed in configuration with the 'UploadMaxSize' parameter)
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>--disable-upload-var</term>
-                <listitem>
-                    By default uploads are stored in Tcl variables. 
-                    This switch sets the default for the configuration 
-                    parameter 'UploadFilesToVar' to 0. 
-                    (Can be changed in the configuration)
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-            	<term>--disable-rivet-commands-export</term>
-            	<listitem>
-            		Rivet commands are created in the ::rivet namespace. To improve code readability
-            		it is recommended you write your scripts using the fully qualified name
-            		definitions. For compatibility with existing code, commands are exported from
-            		::rivet and can be thus imported into any namespace (global namespace included)
-            		with the command
-            		<programlisting>namespace import -force ::rivet::*</programlisting>
-            		The default value for this option may change in the future.
-            	</listitem>
-            </varlistentry>
-            <varlistentry>
-            	<term>--disable-import-rivet-commands</term>
-            	<listitem>
-            		By default Rivet commands are implicitly imported into the global namespace.
-            		This action can be disabled using the option --disable-import-rivet-commands. 
-                    In future versions of Rivet the default will be changed to off and eventually
-            		removed altogether, forcing the programmer to explicitly import the commands
-                    from the ::rivet namespace.
-            		<note>This option implicitly sets --enable-rivet-commands-export</note>
-            	</listitem>
-            </varlistentry>
-        </variablelist>
+                To build Rivet, you will need to install the shell (<command>tclsh</command>), 
+                the development headers and the libraries from Tcl (&ge;8.5.10). You will tell Rivet 
+                build scripts where Tcl is located via the <option>--with-tcl</option> option to 
+                <command>configure</command> (see below).
             </para>
+          </step>
+          <step>
+            <title>Get Rivet</title>
             <para>
-                Example: configuring the build system to compile Rivet for an apache 2.x server, using tcl8.5 and
-                specifying a custom name for the apxs program (as it's done for Debian Apache 2.2). 
+                Download the sources at <ulink url="http://tcl.apache.org/rivet/download.html"/>.  
             </para>
-        <programlisting>
-    ./configure --with-tcl=/usr/lib/tcl8.5/ --with-tclsh=/usr/bin/tclsh8.5 --with-apxs=/usr/bin/apxs2 --with-apache=/usr --with-apache-version=2</programlisting>
           </step>
-          <step>
-            <title>Run make</title>
+          <step performance="optional">
+            <title>Get and Install Apache Sources</title>
             <para>
-                At this point, you are ready to run make, which should
-                run to completion without any errors (a warning or two
-                is ok, generally). Running 'make clean' beforehand can be useful
-                if you are rebuilding after having changed some parameters passed
-                to 'configure'
+                Rivet needs some Apache include (.h) files in order to build.  The easiest way 
+                to get them is to download the source code of the Apache web server, although some systems
+                (Debian GNU/Linux for example) make it possible to install only the headers and other 
+                development files.  If you intend to build Rivet statically (compiled into the Apache web
+                server instead of loaded dynamically), you definitely need the sources.  
+                We recommend that you build Rivet as a loadable shared library, for maximum flexibility,
+                meaning that you also build Apache to be able to load modules. Other than that, 
+                the default Apache install is fine.  We will tell Rivet where it is located via the 
+                <option>--with-apxs</option> option to <command>configure</command> (see below).
+            </para>
+            <para>
+                The source code for the Apache web server may be found by following the links here: 
+                <ulink url="http://httpd.apache.org/"/>.
             </para>
           </step>
           <step>
-            <title>Install</title>
+            <title>Uncompress Sources</title>
             <para>
-                Now, you are ready to run the <command>make install</command> 
-                to install the resulting files. This should copy the shared object 
-                (like <filename>mod_rivet.so</filename>, if one was successfully
-                created, into Apache's <filename>libexec</filename> directory, 
-                as well as install some support scripts and various code.
+              We will assume that you have Apache installed at this point.
+              You must uncompress the Rivet sources in the directory where you
+              wish to compile them.
+              <programlisting>gunzip rivet-X.X.X.tar.gz
+tar -xvf rivet-X.X.X.tar.gz</programlisting>
             </para>
           </step>
-        </substeps>
-          </step>
-          <step>
-        <title>Apache Configuration Files</title>
-        <para>
-          Rivet is relatively easy to configure - we start off by
-          adding the module itself:
-        </para>
-
-        <programlisting>LoadModule rivet_module	<replaceable>/usr/lib/apache2/modules/mod_rivet.so</replaceable></programlisting>
-
-        <para>
-          This tells Apache to load the Rivet shared object, wherever
-          it happens to reside on your file system.  Now we have to
-          tell Apache what kind of files are "Rivet" files and how to
-          process them:
-        </para>
+      <step>
+	<title>Building Rivet</title>
+	<substeps>
+	  <step>
+	    <para>
+	      On Linux or Unix systems, Rivet uses the standard <command>./configure ; make ; make install</command> technique.
+	    </para>
+	    <para>
+	      There are several rivet specific options to configure that might be useful (or needed):
+	      <variablelist>
+		<varlistentry>
+		  <term>--with-tcl</term>
+		  <listitem>
+		    <para>
+		      This points to the directory where the
+		      <filename>tclConfig.sh</filename> file is located.
+		    </para>
+		  </listitem>
+		</varlistentry>
+		<varlistentry>
+		  <term>--with-tclsh</term>
+		  <listitem>
+		    <para>This points to the location of the
+		      <filename>tclsh</filename> executable.</para>
+		  </listitem>
+		</varlistentry>
+		<varlistentry>
+		  <term>--with-apxs</term>
+		  <listitem>
+		    <para>The location of the <filename>apxs</filename>
+		      program that provides information about the
+		      configuration and compilation options of Apache modules.</para>
+		  </listitem>
+		</varlistentry>
+		<varlistentry>
+		  <term>--with-apache-version=[1|2]</term>
+		  <listitem>
+		    <para>
+			This option tells the build scripts whether you want to build Rivet for the
+			Apache 1.x or Apache 2.x server.
+		    </para>
+		  </listitem>
+		</varlistentry>
+		<varlistentry>
+		  <term>--with-apache-include[=DIR]</term>
+		  <listitem>
+		    <para>
+			    Locates the Apache include files on your computer, if they're not in standard directory. 
+		    </para>
+		  </listitem>
+		</varlistentry>
+		<varlistentry>
+		  <term>--enable-version-display=[yes|no]</term>
+		  <listitem>
+		    <para>
+			This option enables Rivet to display its version in the logfiles when Apache is started. 
+			The default is to keep Rivet version hidden.
+		    </para>
+		  </listitem>
+		</varlistentry>
+		<varlistentry>
+		    <term>--with-rivet-target-dir=DIR</term>
+		    <listitem>
+			<para>
+			    This option tells the install script where Rivet's Tcl packages have to be copied. 
+			</para>
+		    </listitem>
+		</varlistentry>
+	      </variablelist>
+	    </para>
+	    <para>
+		Example: configuring the build system to compile Rivet for an apache 2.x server, using tcl8.5 and
+		specifying a custom name for the apxs program. 
+	    </para>
+	<programlisting>./configure --with-tcl=/usr/lib/tcl8.5/ --with-tclsh=/usr/bin/tclsh8.5 \
+	    --with-apxs=/usr/bin/apxs2 --with-apache=/usr --with-apache-version=2</programlisting>
+	  </step>
+	  <step>
+	    <title>Run make</title>
+	    <para>
+	      At this point, you are ready to run make, which should
+	      run to completion without any errors (a warning or two
+	      is ok, generally).
+	    </para>
+	  </step>
+	  <step>
+	    <title>Install</title>
+	    <para>
+	      Now, you are ready to run the <command>make
+		install</command> to install the resulting files.
+		This should copy the shared object (like
+		<filename>mod_rivet.so</filename>, if one was
+		successfully created, into Apache's
+		<filename>libexec</filename> directory, as well as
+		install some support scripts and various code.
+	    </para>
+	  </step>
+	</substeps>
+      </step>
+      <step>
+	<title>Apache Configuration Files</title>
+	<para>
+	  Rivet is relatively easy to configure - we start off by
+	  adding the module itself:
+	</para>
+
+	<programlisting>LoadModule rivet_module	<replaceable>/usr/lib/apache2/modules/mod_rivet.so</replaceable></programlisting>
+
+	<para>
+	  This tells Apache to load the Rivet shared object, wherever
+	  it happens to reside on your file system.  Now we have to
+	  tell Apache what kind of files are "Rivet" files and how to
+	  process them:
+	</para>
 
-        <programlisting>AddType application/x-httpd-rivet .rvt
+	<programlisting>AddType application/x-httpd-rivet .rvt
 AddType application/x-rivet-tcl .tcl</programlisting>
 
-        <para>
-          These tell Apache to process files with the
-          <filename>.rvt</filename> and <filename>.tcl</filename>
-          extensions as Rivet files.
-        </para>
-        <para>
-          The characters encoding can be changed using the <command>header type</command> command,
-          but you can also change the default charset for the whole site:
-        </para>
-        <programlisting>AddType 'application/x-httpd-rivet;charset=utf-8' rvt</programlisting>
-        <para>
-           All the pages generated by Rivet on this site will be sent with a 
-            <command>Content-Type:'text/html;charset=utf-8'</command> header.
-        </para>
-        <para>You may also wish to use Rivet files as index files for
-        directories.  In that case, you would do the following:</para>
-        <programlisting>DirectoryIndex index.html index.htm index.shtml index.cgi index.tcl index.rvt</programlisting>
-        <para>
-          For other directives that Rivet provides for Apache
-          configuration, please see <xref linkend="directives"/>.
-        </para>
+	<para>
+	  These tell Apache to process files with the
+	  <filename>.rvt</filename> and <filename>.tcl</filename>
+	  extensions as Rivet files.
+	</para>
+	<para>
+	  The characters encoding can be changed using the <command>header type</command> command,
+	  but you can also change the default charset for the whole site:
+	</para>
+	<programlisting>AddType 'application/x-httpd-rivet;charset=utf-8' rvt</programlisting>
+	<para>
+	   All the pages generated by Rivet on this site will be sent with a 
+	    <command>Content-Type:'text/html;charset=utf-8'</command> header.
+	</para>
+	<para>You may also wish to use Rivet files as index files for
+	directories.  In that case, you would do the following:</para>
+	<programlisting>DirectoryIndex index.html index.htm index.shtml index.cgi index.tcl index.rvt</programlisting>
+	<para>
+	  For other directives that Rivet provides for Apache
+	  configuration, please see <xref linkend="directives"/>.
+	</para>
       </step>
     </procedure>
 </section>

Modified: tcl/rivet/branches/2.1/doc/xml/request.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/doc/xml/request.xml?rev=1392441&r1=1392440&r2=1392441&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/doc/xml/request.xml (original)
+++ tcl/rivet/branches/2.1/doc/xml/request.xml Mon Oct  1 16:52:39 2012
@@ -4,71 +4,60 @@
     <simplesect>
     	<title>Apache Child Process Lifecycle</title>
 	    <para>
-			At startup Apache spawns child processes which are to become the real
-			agents responding to incoming HTTP requests.
-
-	    	The number of child processes that have to be initially created
-	    	can be controlled in the configuration and the optimum choice
-	    	for this numbers basically depends on the webserver workload and on the 
-	    	available system resources. See
+            Apache Rivet delegates to the <ulink url="">Multi-Processing Module (MPM)</ulink>
+            the task of managing the agents responding to network requests. 
+            An MPM is responsible for creating such agents during the start-up, 
+            and is in charge for terminating existing ones and recreating new 
+            agents when the workload is requiring it. 
+        </para>
+        <para>
+            Apache Rivet is currently supporting only the
+            <ulink url="http://httpd.apache.org/docs/2.2/mod/prefork.html">prefork</ulink> MPM which creates full
+            fledge child processes as independent agents responding to network requests. 
+            Efforts are under way to extend the support to
+            the <ulink url="http://httpd.apache.org/docs/2.2/mod/worker.html">worker</ulink> MPM, a hybrid model where forked
+            child processes in turn create threads as real network agents. If we can achieve this the goal
+            would open the possibility of supporting also the Windows&copy; specific 
+            <ulink url="http://httpd.apache.org/docs/2.2/mod/mpm_winnt.html">winnt</ulink> MPM, where
+            a single process creates and manages a large number of thread agents.
+        </para>
+        <para>
+	    	Configuration parameters about this critical point can be read in the
 	    	<ulink url="http://httpd.apache.org/docs/2.2/misc/perf-tuning.html">Apache
-	    	documentation</ulink> for further reading about this crucial point. 
-	    	 If your webserver has been properly configured you will have Tcl 
-	    	scripts executed (Rivet templates go through a parsing stage before execution)
-	    	when tcl or rvt files are referenced in one of these cases
-	    	<itemizedlist>
-	    		<listitem>The script is explicitly referenced in the URL. E.g.:
-	    		<programlisting>http://&lt;myserver&gt;/&lt;path-to-script&gt;/&lt;script&gt;.tcl</programlisting></listitem>
-	    		<listitem>The script is implicitly referenced by rewriting the URL. See:
-		<ulink url="http://httpd.apache.org/docs/current/mod/mod_rewrite.html">mod_rewrite</ulink> 
-				documentation</listitem>
-	    		<listitem>The script is implicitly referenced by 
-	<ulink url="http://httpd.apache.org/docs/2.0/mod/mod_alias.html">redirecting or
-	    			aliasing</ulink> the URL to the real script</listitem>
-	    	</itemizedlist>
-	    	Your web applications will be doing much of their work doing this work of
-	    	responding to requests and creating content to be sent back to a client.
+	    	documentation</ulink>. 
 	    </para>
 	    <para>
-	    	There are 4 stages in the life of an Apache webserver that are relevant
+	    	There are 4 stages in the lifetime of an Apache webserver that are relevant
 	    	to Rivet: 
 	    </para>
 	    <orderedlist>
 	    	<listitem>
 	    		<bridgehead>Single Process Initialization</bridgehead>
 	    		<para>
-		    		After Apache has parsed the configuration file the webserver is still
-		    		a single process application. This stage has a hook in Rivet
-		    		which does some checks and initialization before the server 
-		    		becomes operational. In this phase 
-		    		a configured <command>ServerInitScript</command> (if defined)
-		    		is run just after Rivet has created and initialized its master 
-		    		interpreter, a Tcl_Interp instance from which child process 
-		    		interpreters will be created by copy. <command>ServerInitScript</command>
+                    Apaches starts up as a single process and you can drop in the configuration
+                    a script to be run during this stage through the <command>ServerInitScript</command> 
+                    directive. Variables, arrays or dictionaries set up during this stage will be 
+                    replicated in a child process intepreter at high speed, since a fork() call 
+                    involves only in memory copy of sections of a process address space. Thus
+                    <command>ServerInitScript</command>
 		    		is a good place to do global initialization that doesn't involve
 		    		creation of private data. Example of tasks that can be done
 		    		in this context are importing namespace commands and loading packages
 		    		providing code of general interest for every application to
 		    		be served. 
 	    		</para>
-	    		<para>
-	    			<note>
-	    				<command>ServerInitScript</command> has effect for child processes when 
-		    			<command>SeparateVirtualInterps</command> is off</note>
-		    	</para>
 	    	</listitem>
 	    	<listitem>
 	    		<bridgehead>Child Process Initialization</bridgehead>
 	    		<para>
-		    		Right after the webserver has spawned the child processes that are 
-		    		to become the real "servers", there is a chance to perform specific 
-		    		initialization of their interpreters. This is the stage where most 
-		    		likely you want to open I/O channels, database connections or any other
-		    		resource that has to be private to an interpreter.
-		    		When the option <command>SeparateVirtualInterps</command> is turned off 
-		    		child processes will have a single interpreter regardless
-		    		the name of the virtual host a request is aimed at. 
-		    		This interpreter will have a <command>GlobalInitScript</command> 
+		    		Right after the webserver has forked the child processes 
+		    		there is a chance to perform specific initialization of their interpreters.
+                    This is the stage where most likely you want to open I/O channels, 
+                    database connections or any other resource that has to be private to an 
+                    interpreter. When the option <command>SeparateVirtualInterps</command> is 
+                    turned off child processes will have a single interpreter regardless
+		    		the number of virtual hosts for which a configuration block
+                    is defined. This interpreter will have a <command>GlobalInitScript</command> 
 		    		as initialization.
 	    		</para>
 	    		<para>
@@ -92,60 +81,61 @@
 	    	<listitem>
 	    		<bridgehead>Request Processing and Content Generation</bridgehead>
 	    		<para>
-		   		After a child has been initialized it's ready to serve requests. 
-		   		A child process' life is spent almost completely in this phase, waiting
-		   		for connections and responding to requests. At every request the URL 
-		   		goes through processing and, in case, rewritten by metadata manipulators
-		   		(mod_rewrite, Alias directives, etc). 
-		   		Parameter values encoded in the request are made available to the 
-		   		environment and finally the script encoded in the URL is run. 
-		   		The developer can tell Rivet 	if optionally the execution has to
-		   		be  preceded by a <command>BeforeScript</command> and followed by an
-		   		<command>AfterScript</command>. Actually the real script to be executed is 
-		   		built by concatenation of the <command>BeforeScript</command>,
-		   		the script encoded in the URL and the <command>AfterScript</command>.
-		   		Thus the whole ensemble of code that makes up a web application might
-		   		be running within the same "before" and "after" scripts to which 
-		   		the programmer can devolve tasks common to every 
-		   		page of an application.
-	   		</para>
-	   	</listitem>
-	   	<listitem>
-	   		<bridgehead>Child Process Exit</bridgehead>
-	   		<para>
-		   		If no error condition forces the child process to a premature exit, his
-		   		life is determined by the Apache configuration parameters. To reduce
-		   		the effects of memory leaks in buggy applications the Apache webserver 
-		   		forces a child process to exit after a
-		   		certain number of requests served. A child process gets replaced 
-		   		with a brand new one if the workload of webserver requires so. 
-		   		Before the process quits an exit handler can be run
-		   		to do some housekeeping, just in case something the could have been 
-		   		left behind has to be cleaned up. Like the initialization scripts
-		   		<command>ChildExitScript</command> too is a "one shot" script.
-	   		</para>
-	   		<para>
-	   			The Tcl <command>exit</command> command forces an interpreter to
-	   			quit, thus removing the ability of the process embedding it 
-	   			to run more Tcl scripts. The child process then is forced
-	   			to exit and be replaced by a new one when the workload demands it.
-	   			This operation implies the <command>ChildExitScript</command> be
-	   			run before the interpreter is actually deleted.
-	   		</para>
-	   	</listitem>
+                    After a child has been initialized it's ready to serve requests. 
+                    A child process' lifetime is almost entirely spent in this phase, waiting
+                    for connections and responding to requests. At every request the URL 
+                    goes through filter processing and, in case, rewritten
+                    (mod_rewrite, Alias directives, etc). 
+                    Parameter values encoded in the request are made available to the 
+                    environment and finally the script encoded in the URL is run. 
+                    The developer can tell Rivet if optionally the execution has to
+                    be  preceded by a <command>BeforeScript</command> and followed by an
+                    <command>AfterScript</command>. The real script mod_rivet will
+                    execute is the result of the concatenation of the 
+                    <command>BeforeScript</command>,
+                    the script encoded in the URL and the <command>AfterScript</command>.
+                    Thus the whole ensemble of code that makes up a web application might
+                    be running within the same "before" and "after" scripts to which 
+                    the programmer can devolve tasks common to every 
+                    page of an application.
+                </para>
+            </listitem>
+            <listitem>
+                <bridgehead>Child Process Exit</bridgehead>
+                <para>
+                    If no error condition forces the child process to a premature exit, his
+                    life is determined by the Apache configuration parameters. To reduce
+                    the effects of memory leaks in buggy applications the Apache webserver 
+                    forces a child process to exit after a
+                    certain number of requests served. A child process gets replaced 
+                    with a brand new one if the workload of webserver requires so. 
+                    Before the process quits an exit handler can be run
+                    to do some housekeeping, just in case something the could have been 
+                    left behind has to be cleaned up. Like the initialization scripts
+                    <command>ChildExitScript</command> too is a "one shot" script.
+                </para>
+                <para>
+                    The Tcl <command>exit</command> command forces an interpreter to
+                    quit, thus removing the ability of the process embedding it 
+                    to run more Tcl scripts. The child process then is forced
+                    to exit and be replaced by a new one when the workload demands it.
+                    This operation implies the <command>ChildExitScript</command> be
+                    run before the interpreter is actually deleted.
+                </para>
+            </listitem>
 	    </orderedlist>
 	</simplesect>
 	<simplesect>
     	<title>Apache Rivet Error and Exception Scripts Directives</title>
-	   <para>
-	    	Rivet is highly configurable and each of the webserver lifecycle stages 
-	    	can be exploited to control a web application. 
-	    	Not only the orderly sequence of stages
-	    	in a child lifecycle can be controlled with Tcl scripts, but also
-	    	Tcl error or abnormal conditions taking place during
-	    	the execution can be caught and handled with specific scripts.
-		</para>
-	   <para>
+        <para>
+            Rivet is highly configurable and each of the webserver lifecycle stages 
+            can be exploited to control a web application. 
+            Not only the orderly sequence of stages
+            in a child lifecycle can be controlled with Tcl scripts, but also
+            Tcl error or abnormal conditions taking place during
+            the execution can be caught and handled with specific scripts.
+        </para>
+	    <para>
 	    	Tcl errors (conditions generated when a command exits with code TCL_ERROR) 
 	    	usually result in the printing of a backtrace of the code fragment
 	    	relevant to the error.



---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org