[OSM-dev] Improvement of tile rendering
Udo Giacomozzi
udo.osm at nova-sys.net
Sat Mar 21 01:25:11 GMT 2009
Hello Jon,
Friday, March 20, 2009, 7:48:42 PM, you wrote:
JB> If you want to mess around with a slightly higher level implementation,
JB> I recently re-implemented the mod_tile render daemon into python [1].
Unfortunately I'm not familiar with Python.
JB> It is functionally equivalent to the C render daemon.
BTW, where can I find the source code of the C daemon?
JB> It still requires the
JB> C mod_tile module, but I am considering writing a python version of that
JB> too.
You might want to use FastCGI instead of messing around with Apache
modules. It offers a number of advantages:
- in this case a Apache module is probably not really faster than a
FastCGI implementation
- FastCGI would allow you to keep rendering daemon and request
handling at one place (in one process)
- FastCGI is more portable, as it is not bound to Apache (consider
Lighttpd)
- you have full control over threading, like limiting the number of
concurrent requests. This is very important for optimizazion.
- your FastCGI server can be restarted/replaced or crash at any time
without bringing the whole web server down
- the FastCGI server runs with it's own system user, which makes file
access (caching...) easier
I'm using FastCGI in a number of projects and programming languages.
Some of them easily handle up to 100 requests per second on a standard
server.
JB> The purpose of these is to allow easier experimentation. If some good
JB> new ideas develop then I may adopt them into the C code. Another
JB> possibility is mixing the two implementations together by linking an
JB> embedded python interpretor into the C code.
...I'm sure Python supports FastCGI. If you are unfamiliar with it,
you should have a look at it. It's very simple (which makes it so
good).
Anyway, I would suggest to do any dynamic processing only in case a
tile is missing (i.e. installing it as a error 404 handler), because
most requests will probably go to already rended tiles. In this case
the web server will just have to serve a static file without having to
invoke Python or anything.
Udo
More information about the dev
mailing list