[Tilesathome] Proposal: tiles at home (OSM data?) mirrors

Francisco R. Santos frsantos at gmail.com
Tue May 29 15:24:24 BST 2007


Hi all,

I've noticed that several people are willing to donate a server for
tiles at home or OSM. However, no personal server can currently manage the load
of processing the tiles for tiles at home, a cluster of servers is needed. So,
why can't we create it? Mirroring data is an old concept. Mirroring data in
hierarchical way is old, too: just remember DNS.

 So, let's suppose the following scenario:

Rendering:
* I have a tiles at home client at home.
* This client requests a cell to the central server C.
* Server C chooses a tileset to render, say (x,y), and looks up the mirror
that is in charge of that area (say mirror M)
* Server C answer: "render level 12 cell (x,y) and send results to mirror
M".
* When the client finishes the level 12 cell (x,y), it sends the data to
mirror M, and then tell the central server C that it has been done: "I've
sent level 12 cell (x,y) to mirror M".
* The mirror M expands the tileset in its own disk.
* The central server C saves in its database the information of the tileset:
"mirror M has level 12 cell (x,y)". (May be redundant, as it already knows
that mirror M is in charge of the area).

Browsing:
* User A wants to browse his city. Opens the browser and requests
coordinates (Lat,Lon).
* The map script at server looks up the mirror(s) M in charge of the area
the user wants to see, and builds the HTML page that requests the map with
the list of mirrors.
* The browser requests to the mirrors all the cells A wants to see.
* If a mirror M is requested for a tile it does not have (because it belongs
to other mirror), it sends a HTTP 307 response (temporary redirect), and
redirects to the Central server C (or, if it already knows the mirror in
charge, it redirects directly to the mirror M2).
* If a mirror M may know that a subset of tilesets it manages are in a sub
mirror SM, it redirects to the submirror directly.
* If a mirror is requested a cell that does not exists, but that belongs to
its area, it just sends a 404 or a blank land/sea cell.

For example, I could manage a mirror that only handles tilesets of the city
Madrid, Spain. This could be a normal server, as Madrid is small, but there
could be another big mirror for Spain, and a bigger mirror for Europe. So,
if anyone is mapping San Marino, and this area hasn't its own mirror, it
could use the european one.

This way, the server/network load is shared among several servers, in a way
that can be expanded very easily. One server is very loaded: just split the
loaded area in two mirrors that depends on it.

This schema is presented here only for tiles at home, but it may be also
useful, with modifications, for OSM data itself (I know, I know, SteveC
doesn't want to mirror OSM data, but just an idea.)

Regards,
Quico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tilesathome/attachments/20070529/02f33921/attachment.html>


More information about the Tilesathome mailing list