I am creating an app in Android that requires cached areas. I allow the user to cache an area of reasonable size. The server provides these tiles in a zip in the format /z/x/y.png.
I took a (very) naive approach and simply wrote a python script to grab the images from the localhost using apache2 with mod_tile (127.0.0.1/osm/z/x/y.png), save to a directory, then zip.
Under a load test, this failed terribly. Is there a more efficient way to create the png files locally? (Mapnik api and python?) Or is a queue for users an absolute necessity to prevent server overload?