Hi,
    The *DRAFT* ARC case for mod_ruby and mod_python is below.

Please do review.


Additional Apache2 Modules mod_python and mod_ruby

11 March 2008

1.    Summary and motivation

    1.1.    Introduction

    This project delivers Apache modules mod_python and mod_ruby
    to the Apache2 (PSARC/2007/586) in OpenSolaris.

    Modules allow Apache to integrate and provide functionality
    during runtime that were not available during compile time.

    1.1.1 mod_python
    From modpython.org[1] "mod_python is an Apache module that
    embeds the Python interpreter within the server. With mod_python you can
    write web-based applications in Python that will run many times faster
    than traditional CGI and will have access to advanced features such as
    ability to retain database connections and other data between hits and
    access to Apache internals"

    1.1.2 mod_ruby
    From modruby.net[2] "mod_ruby embeds the Ruby interpreter into the
    Apache web server, allowing Ruby CGI scripts to be executed natively.
    These scripts will start up much faster than without mod_ruby."

    This project integrates the most recent stable releases of
    mod_python[1] 3.3.1 and mod_ruby[2] 1.2.6

    This case seeks Minor Release Binding.

2.    Technical issues

    2.1.    Key objects

    2.1.1.1  mod_python Apache objects
    /usr/apache2/2.2/libexec/mod_python.so

    /usr/apache2/2.2/libexec/${ISAINFO}/mod_python.so

    2.1.1.2  mod_python library objects

    /usr/lib/python2.4/site-packages/mod_python/testhandler.py
    /usr/lib/python2.4/site-packages/mod_python/Cookie.py
    /usr/lib/python2.4/site-packages/mod_python/publisher.py
    /usr/lib/python2.4/site-packages/mod_python/__init__.py
    /usr/lib/python2.4/site-packages/mod_python/util.py
    /usr/lib/python2.4/site-packages/mod_python/cgihandler.py
    /usr/lib/python2.4/site-packages/mod_python/apache.py
    /usr/lib/python2.4/site-packages/mod_python/importer.py
    /usr/lib/python2.4/site-packages/mod_python/psp.py
    /usr/lib/python2.4/site-packages/mod_python/Session.py
    /usr/lib/python2.4/site-packages/mod_python/cache.py
    /usr/lib/python2.4/site-packages/mod_python/python22.py
    /usr/lib/python2.4/site-packages/mod_python/_psp.so
    /usr/lib/python2.4/site-packages/mod_python/${ISAINFO}/_psp.so
    /usr/lib/python2.4/site-packages/mod_python/testhandler.pyc
    /usr/lib/python2.4/site-packages/mod_python/Cookie.pyc
    /usr/lib/python2.4/site-packages/mod_python/publisher.pyc
    /usr/lib/python2.4/site-packages/mod_python/__init__.pyc
    /usr/lib/python2.4/site-packages/mod_python/util.pyc
    /usr/lib/python2.4/site-packages/mod_python/cgihandler.pyc
    /usr/lib/python2.4/site-packages/mod_python/apache.pyc
    /usr/lib/python2.4/site-packages/mod_python/importer.pyc
    /usr/lib/python2.4/site-packages/mod_python/psp.pyc
    /usr/lib/python2.4/site-packages/mod_python/Session.pyc
    /usr/lib/python2.4/site-packages/mod_python/cache.pyc
    /usr/lib/python2.4/site-packages/mod_python/python22.pyc
    /usr/lib/python2.4/site-packages/mod_python/testhandler.pyo
    /usr/lib/python2.4/site-packages/mod_python/Cookie.pyo
    /usr/lib/python2.4/site-packages/mod_python/publisher.pyo
    /usr/lib/python2.4/site-packages/mod_python/__init__.pyo
    /usr/lib/python2.4/site-packages/mod_python/util.pyo
    /usr/lib/python2.4/site-packages/mod_python/cgihandler.pyo
    /usr/lib/python2.4/site-packages/mod_python/apache.pyo
    /usr/lib/python2.4/site-packages/mod_python/importer.pyo
    /usr/lib/python2.4/site-packages/mod_python/psp.pyo
    /usr/lib/python2.4/site-packages/mod_python/Session.pyo
    /usr/lib/python2.4/site-packages/mod_python/cache.pyo
    /usr/lib/python2.4/site-packages/mod_python/python22.pyo

    2.1.2.1  mod_ruby Apache objects

    /usr/apache2/2.2/libexec/mod_ruby.so
    /usr/apache2/2.2/libexec/${ISAINFO}/mod_ruby.so
    
    2.1.2.2  mod_ruby library objects

    /usr/ruby/1.8/lib/ruby/1.8/apache/ruby-run.rb
    /usr/ruby/1.8/lib/ruby/1.8/apache/registry.rb
    /usr/ruby/1.8/lib/ruby/1.8/apache/eruby-run.rb
    /usr/ruby/1.8/lib/ruby/1.8/apache/erb-run.rb
    /usr/ruby/1.8/lib/ruby/1.8/apache/rd2html.rb
    /usr/ruby/1.8/lib/ruby/1.8/apache/ruby-debug.rb
    /usr/ruby/1.8/lib/ruby/1.8/apache/eruby-debug.rb
    /usr/ruby/1.8/lib/ruby/1.8/apache/ruby-profile.rb
    /usr/ruby/1.8/lib/ruby/1.8/apache/rails-dispatcher.rb
    /usr/ruby/1.8/lib/ruby/1.8/apache/query.rb

    2.2 Versioning

    mod_python and mod_ruby have a single active release.

    It is not possible to query the modules to find out their
    versions.  The only way to do that is to look at the package
    description for the package including it.

    2.2 Directory Naming and Structure

    This project delivers the shared libraries of 32 bit and 64 bit
    into /usr/apache2/2.2/libexec and /usr/apache2/2.2/libexec/${ISAINFO}/ 
    directories of apache. This is in keeping with the approach taken
    by the Apache2 integration project for OpenSolaris (PSARC/2007/586).

    The scriping language libraries are made available under the
    standard location for their respective languages.

3. Documentation

    The modules mod_python and mod_ruby do not install documentation into
    apache though they come with some documentation in their source. The
    recommended way to access their documentation is to look at their
    websites modpython.org[1] and modruby.net[2]. A list of external apache
    modules that has been added and their corresponding sites will be part
    of the release document.

4. Packaging and Delivery

    The modules will be split into two parts. One the apache part which
    consists of modules loadable into apache, and another the scripting
    library part.

    The apache modules will be delivered under the cluster SUNWCapch22m.
    This cluster will carry SUNWapch22m-python and SUNWapch22m-ruby.

    The scripting library part of mod_python will be delivered under
    SUNWPython-apache.

    The scripting library part of mod_ruby will be delivered under 
    SUNWruby18-apache.
   
5.  Interfaces

    5.1.    Interface Stability

    The interface stability of both of these modules are Volatile as
    these are controlled by external organisations over which Sun has
    no control. The specific researches regarding stability of each
    module are captured below.

    5.1.1 mod_python
    "X.Y.Z to X.Y.Z+n would generally aim to be compatible. X.Y to
    X.Y+n or X to X+n probably aren't going to be compatible except for where
    you are using possibly some core subset of mod_python functionality."
    The complete list of directives are presented as Addendum 1. The
    complete list of all directives APIs and their explanations as 
    provided by modpython.org is available as modpython.pdf


    5.1.2 mod_ruby
       There were no commitments from mod_ruby developers in this
    regard. The project has not had a release after 2006. The interface of
    mod_ruby (its configuration options) is presented as Addendum 2. The
    complete list of APIs and their explanation as provided by modruby.net
    is available as mod_ruby_classes.en.rd and mod_ruby_directives.en.rd
    (both are plain text files in ruby rdoc format.)

    5.2.    Imported Interfaces

    These Apache modules imports interfaces from

    NAME                       STABILITY         NOTES
    ------------------------------------------------------------
    Apache2                    Uncommitted       PSARC/2007/586/   
    SUNWPython                 External          PSARC/2005/532/
    SUNWruby18u                Uncommitted       PSARC/2007/600/


    5.3.    Exported Interfaces

    NAME                                                STABILITY
    --------------------------------------------------------------- 
    /usr/apache2/2.2/libexec/mod_python.so                Volatile
    /usr/apache2/2.2/libexec/mod_ruby.so                  Volatile
    /usr/apache2/2.2/libexec/${ISAINFO}/mod_python.so     Volatile
    /usr/apache2/2.2/libexec/${ISAINFO}/mod_ruby.so       Volatile

    /usr/lib/python2.4/site-packages/mod_python/testhandler.py     Volatile
    /usr/lib/python2.4/site-packages/mod_python/Cookie.py          Volatile
    /usr/lib/python2.4/site-packages/mod_python/publisher.py       Volatile
    /usr/lib/python2.4/site-packages/mod_python/__init__.py        Volatile
    /usr/lib/python2.4/site-packages/mod_python/util.py            Volatile
    /usr/lib/python2.4/site-packages/mod_python/cgihandler.py      Volatile
    /usr/lib/python2.4/site-packages/mod_python/apache.py          Volatile
    /usr/lib/python2.4/site-packages/mod_python/importer.py        Volatile
    /usr/lib/python2.4/site-packages/mod_python/psp.py             Volatile
    /usr/lib/python2.4/site-packages/mod_python/Session.py         Volatile
    /usr/lib/python2.4/site-packages/mod_python/cache.py           Volatile
    /usr/lib/python2.4/site-packages/mod_python/python22.py        Volatile
    /usr/lib/python2.4/site-packages/mod_python/_psp.so            Volatile
    /usr/lib/python2.4/site-packages/mod_python/${ISAINFO}/_psp.so Volatile
    /usr/lib/python2.4/site-packages/mod_python/testhandler.pyc    Volatile
    /usr/lib/python2.4/site-packages/mod_python/Cookie.pyc         Volatile
    /usr/lib/python2.4/site-packages/mod_python/publisher.pyc      Volatile
    /usr/lib/python2.4/site-packages/mod_python/__init__.pyc       Volatile
    /usr/lib/python2.4/site-packages/mod_python/util.pyc           Volatile
    /usr/lib/python2.4/site-packages/mod_python/cgihandler.pyc     Volatile
    /usr/lib/python2.4/site-packages/mod_python/apache.pyc         Volatile
    /usr/lib/python2.4/site-packages/mod_python/importer.pyc       Volatile
    /usr/lib/python2.4/site-packages/mod_python/psp.pyc            Volatile
    /usr/lib/python2.4/site-packages/mod_python/Session.pyc        Volatile
    /usr/lib/python2.4/site-packages/mod_python/cache.pyc          Volatile
    /usr/lib/python2.4/site-packages/mod_python/python22.pyc       Volatile
    /usr/lib/python2.4/site-packages/mod_python/testhandler.pyo    Volatile
    /usr/lib/python2.4/site-packages/mod_python/Cookie.pyo         Volatile
    /usr/lib/python2.4/site-packages/mod_python/publisher.pyo      Volatile
    /usr/lib/python2.4/site-packages/mod_python/__init__.pyo       Volatile
    /usr/lib/python2.4/site-packages/mod_python/util.pyo           Volatile
    /usr/lib/python2.4/site-packages/mod_python/cgihandler.pyo     Volatile
    /usr/lib/python2.4/site-packages/mod_python/apache.pyo         Volatile
    /usr/lib/python2.4/site-packages/mod_python/importer.pyo       Volatile
    /usr/lib/python2.4/site-packages/mod_python/psp.pyo            Volatile
    /usr/lib/python2.4/site-packages/mod_python/Session.pyo        Volatile
    /usr/lib/python2.4/site-packages/mod_python/cache.pyo          Volatile
    /usr/lib/python2.4/site-packages/mod_python/python22.pyo       Volatile

    /usr/ruby/1.8/lib/ruby/1.8/apache/ruby-run.rb                  Volatile
    /usr/ruby/1.8/lib/ruby/1.8/apache/registry.rb                  Volatile
    /usr/ruby/1.8/lib/ruby/1.8/apache/eruby-run.rb                 Volatile
    /usr/ruby/1.8/lib/ruby/1.8/apache/erb-run.rb                   Volatile
    /usr/ruby/1.8/lib/ruby/1.8/apache/rd2html.rb                   Volatile
    /usr/ruby/1.8/lib/ruby/1.8/apache/ruby-debug.rb                Volatile
    /usr/ruby/1.8/lib/ruby/1.8/apache/eruby-debug.rb               Volatile
    /usr/ruby/1.8/lib/ruby/1.8/apache/ruby-profile.rb              Volatile
    /usr/ruby/1.8/lib/ruby/1.8/apache/rails-dispatcher.rb          Volatile
    /usr/ruby/1.8/lib/ruby/1.8/apache/query.rb                     Volatile
   


6.    References

   1. http://www.modpython.org/
   2. http://www.modruby.net/


==============================================================================

Addendum 1
----------
mod_python interfaces:
Configuration Directives
    Request Handlers 
        PythonPostReadRequestHandler 
        PythonTransHandler 
        PythonHeaderParserHandler 
        PythonInitHandler 
        PythonAccessHandler 
    PythonAuthenHandler 
        PythonAuthzHandler 
        PythonTypeHandler 
        PythonFixupHandler 
        PythonHandler 
        PythonLogHandler 
        PythonCleanupHandler 
    Filters 
        PythonInputFilter 
        PythonOutputFilter 
        Connection Handler 
        PythonConnectionHandler 
    Other Directives 
        PythonEnablePdb 
        PythonDebug 
        PythonImport 
        PythonInterpPerDirectory 
        PythonInterpPerDirective 
        PythonInterpreter 
        PythonHandlerModule 
        PythonAutoReload 
        PythonOptimize 
        PythonOption 
        PythonPath

==============================================================================

Addendum 2
----------
mod_ruby interfaces:

Configuration Directives
    Request Handlers
        RubyTransHandler
        RubyAuthenHandler
        RubyAuthzHandler
        RubyAccessHandler
        RubyTypeHandler
        RubyFixupHandler
        RubyLogHandler
        RubyHeaderParserHandler
        RubyPostReadRequestHandler
        RubyInitHandler
        RubyCleanupHandler
   Other Directives 
        RubyPassEnv
        RubySetEnv
        RubyTimeOut
        RubySafeLevel
        RubyOutputMode
        RubyKanjiCode
        RubyRestrictDirectives
        RubyGcPerRequest



(The modpython.pdf file and mod_ruby*.rd files are not attached.)



Reply via email to