You can clone with
HTTPS or Subversion.
I've been working on a mod_python compatible server wrapper for Mapnik: what we've been using in-house is using a PHP script to essentially proxy shelled-out Mapnik output, and we really want to switch to a standard platform with a WMS frontend.
This is a working implementation of a mod_python wrapper, based off of the CGI server code. The readme explains how to set it up locally, and there's a sample of a Apache configuration for this.
[springmeyer] What kind of performance gains are you seeing using this server over the fcgi approach?
[tmcw] I actually haven't thoroughly tested this module vs. fcgi. The main benefit of this driver is the fact that Mapnik could fit nicely into the rest of the mapping software I (and, I'm sure, others) are using - TileCache, FeatureServer, Django, etc., have mod_python as either a provided or a preferred Python environment.
[springmeyer] Hey tmcw, maybe a wiki page explaining the use and possible improvements of this code would be more appropriate than a ticket?
But, if you are proposing that this code be added to enable mod_python support for the OGCServer, providing a patch(diff file) here would be most helpful.
[tom] Hey, I've made a wiki page: ModServer , and I'll have a patch-version done soon.
[tmcw] This is an improved version of the existing modserver.py, which properly handles exceptions and port numbers.
[springmeyer] Cool tmcw. I'm curious if you've run this against mapnik trunk yet?
Also, have you ever used the wsgi wrapper? It will be interesting to benchmark a comparison since many say mod_wsgi can be faster than mod_python for a range of applications.
I've modified your patch quite a bit, but applied in r910 (Please also note r908 and r909)
Usage for the PYTHONHANDLER script (wms.py) script is now:
from mapnik.ogcserver.modserver import ModHandler
handler = ModHandler('/path/to/ogcserver.conf')
And a sample mod_python apache conf would be:
PythonPath "['/home/dane/projects/ogcserver/'] + sys.path"
AddHandler mod_python .py
Please give it a rip and let me know if it still works for you.
[springmeyer] Whoops, applied a radically wrong file in r910 - http://trac.mapnik.org/browser/trunk/bindings/python/mapnik/ogcserver/modserver.py?rev=911
for the correct file.
[springmeyer] forgot to close this, as it will be in 0.6.0 release
(still needs docs however)