[Tilesathome] WANTED: Tile viewing fastcgi written in C/C++
Kai Krueger
kakrueger at gmail.com
Fri Jul 25 00:06:01 BST 2008
Michael Ritzert wrote:
> Hi spaetz,
>
> spaetz wrote:
>>> I had started writing an apache module in C for the tileset stuff before
>>> I heard that Spaetz rewrote the entire server code. If it is helpful, I
>>> would be happy to continue on it again and adapt it to the new server
>>> layout. It would probably take a couple of days though till I find the
>>> time to finish of the testing. Please let me know if other people are
>>> working on it or if the memory consumption is no longer an issue to
>>> prevent duplicate effort.
>> I have done a (not so) quick (my last C coding was years ago) and ugly
>> fastcgi in ANSI C to serve tiles. And given that the t at h server has just
>> died again, I will try to use it ASAP when the server is up again.
>
> I had a quick look at it and found that ripping everything from mod_example.c shipped with apache and implementing serving tiles (via sendfile, so no copy to userspace needed) is fairly easy. I have the stripped mod_example.c available, so if I can get my hands on your FastCGI C code, I may copy the relavant parts to the apache module. Is it availably in the SVN?
I have written a version of mod_tah and attached it to this mail. It is
not particularly well tested (nor properly documented), but I hope it
would work and has both the fall-back and the oceantiles lookup included.
Looking at apachebench, it seems roughly double the speed compared to
the "old" mod_python serving. Trying to asses the memory consumption, it
seems that apache processes dropped from about 14Mb to 7Mb of resident
memory, but then there were not many processes at any time, so the
overall saving doesn't seem significant. All of this is hitting the
same tile each time, so there is no disk IO involved, which may change
this all completely.
I guess there were talks of moving over completely to lighthttpd, so I
don't know if this implementation will ever be used, but I thought I'd
just post it here for reference in case it might become useful. Also I
don't know if it is any better than the fastcgi version.
Kai
>
> Michael
>
>
>
> _______________________________________________
> Tilesathome mailing list
> Tilesathome at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/tilesathome
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mod_tah.c
Type: text/x-csrc
Size: 11767 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/tilesathome/attachments/20080725/a7ac8810/attachment.c>
More information about the Tilesathome
mailing list