Any comments on this case?
Thanks,
Brian
------------------------------------------------------------------------------
Additional Apache2 Modules mod_python and mod_ruby
04 February 2009
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
/etc/apache2/2.2/conf.d/python.conf
2.1.1.2 mod_python library objects
/usr/lib/python2.6/site-packages/mod_python/testhandler.py
/usr/lib/python2.6/site-packages/mod_python/Cookie.py
/usr/lib/python2.6/site-packages/mod_python/publisher.py
/usr/lib/python2.6/site-packages/mod_python/__init__.py
/usr/lib/python2.6/site-packages/mod_python/util.py
/usr/lib/python2.6/site-packages/mod_python/cgihandler.py
/usr/lib/python2.6/site-packages/mod_python/apache.py
/usr/lib/python2.6/site-packages/mod_python/importer.py
/usr/lib/python2.6/site-packages/mod_python/psp.py
/usr/lib/python2.6/site-packages/mod_python/Session.py
/usr/lib/python2.6/site-packages/mod_python/cache.py
/usr/lib/python2.6/site-packages/mod_python/python22.py
/usr/lib/python2.6/site-packages/mod_python/_psp.so
/usr/lib/python2.6/site-packages/mod_python/testhandler.pyc
/usr/lib/python2.6/site-packages/mod_python/Cookie.pyc
/usr/lib/python2.6/site-packages/mod_python/publisher.pyc
/usr/lib/python2.6/site-packages/mod_python/__init__.pyc
/usr/lib/python2.6/site-packages/mod_python/util.pyc
/usr/lib/python2.6/site-packages/mod_python/cgihandler.pyc
/usr/lib/python2.6/site-packages/mod_python/apache.pyc
/usr/lib/python2.6/site-packages/mod_python/importer.pyc
/usr/lib/python2.6/site-packages/mod_python/psp.pyc
/usr/lib/python2.6/site-packages/mod_python/Session.pyc
/usr/lib/python2.6/site-packages/mod_python/cache.pyc
/usr/lib/python2.6/site-packages/mod_python/python22.pyc
/usr/lib/python2.6/site-packages/mod_python/testhandler.pyo
/usr/lib/python2.6/site-packages/mod_python/Cookie.pyo
/usr/lib/python2.6/site-packages/mod_python/publisher.pyo
/usr/lib/python2.6/site-packages/mod_python/__init__.pyo
/usr/lib/python2.6/site-packages/mod_python/util.pyo
/usr/lib/python2.6/site-packages/mod_python/cgihandler.pyo
/usr/lib/python2.6/site-packages/mod_python/apache.pyo
/usr/lib/python2.6/site-packages/mod_python/importer.pyo
/usr/lib/python2.6/site-packages/mod_python/psp.pyo
/usr/lib/python2.6/site-packages/mod_python/Session.pyo
/usr/lib/python2.6/site-packages/mod_python/cache.pyo
/usr/lib/python2.6/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
/etc/apache2/2.2/conf.d/ruby.conf
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 scripting 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. It was chosen to split the packages into a native
component and a library part as this is the approach taken by the upstream
components. They allow the native part (.so file) and language library
to be installed separately.
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
Both the modules are controlled by external organizations.
The specific researches regarding stability of each module
are captured below. It has to be mentioned that there is no
guarantee that the organizations mentioned above will stick
to these.
5.1.1 mod_python
As explained by a mod_python developer:
"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/2009/043
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
/etc/apache2/2.2/conf.d/python.conf Volatile
/usr/apache2/2.2/conf.d/ruby.conf Volatile
The APIs of both mod_ruby and mod_python are attached
as supporting materials for ARC case. Volatile
6. Limitations
1. mod_ruby
mod_ruby is known to be unstable under Worker MPM for apache
(threaded MPM)
Prefork MPM for mod_ruby is somewhat expensive as each apache process
has to load the entire ruby runtime and the libraries.
64 bit support for mod_ruby is dependent on the parent ruby package
delivering 64 bit libruby.so (As of now, ruby does not deliver a 64
bit library.)
2. mod_python
The mod_python is bulky under Prefork MPM (same as ruby).
mod_python under Worker is stable but for most applications over it
(e.g. Django) it is recommended to run Prefork MPM.
7. 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
_______________________________________________
webstack-discuss mailing list
webstack-discuss at opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/webstack-discuss