Tiles@home/Distributed Server

From OpenStreetMap Wiki
Jump to navigation Jump to search

Rendering client

Responsible for creating maps

  • Renders tiles@home as usual
  • Puts tiles into ZIP files containing exactly one tileset
  • GPG signs each ZIP file
  • Uploads both ZIP and GPG to a tile server (finding out which servers are available by asking load-sharing server)
  • Can also act as a server on the same machine, by copying ZIP files into its own upload queue

TahServer Diagram1.png

Tiles server

Responsible for hosting maps, and for obtaining the maps that it wants to host (either by accepting uploads, or by taking ZIP files from other tile servers)

TahServer Diagram3.png

  • accepts uploads by clients.
  • Verifies GPG signature of each upload using keys from key server to test whether it's from a trusted source
  • can pull uploaded ZIP/GPG sets from other servers, treating them the same as regular uploads
  • can accept uploads from itself, if it's also a rendering client
  • provides HTTP access to the unzipped tiles themselves
  • provides HTTP access to the ZIP/GPG files, for other tile servers to download
  • Sends access statistics to popularity server
  • may accept notifications from other tile servers of tilesets uploaded
  • may send notifications of tilesets uploaded, to other tile servers

TahServer Diagram4.png

Key server

Responsible for deciding who is allowed to create maps.

TahServer Diagram5.png

  • Stores GPG keys of each rendering client, with contact details for each user
  • Provides these keys in HTTP directory for servers to download

TahServer Diagram6.png

Popularity/statistics server

Responsible for helping the tile servers to decide which tilesets they are likely to need copies of

  • accepts access statistics from tile servers
  • provides a page showing most popular queried tilesets, that the tiles servers may use to decide which tilesets to get from other servers
  • may store "new tileset" announcements and make them available for tiles servers to use as they come online
  • may provide human-readable statistics, for monitoring the system

TahServer Diagram7.png

Load-sharing server

Responsible for providing a consistant URL which allows users to locate the currently-available tile servers

TahServer Diagram2.png

  • provides a highly-available URL for tile viewing
  • accepts ping messages from tile servers to say that they're online and advertise the range of tiles they have available. Such information times-out after 10 minutes.
  • provides a page which rendering clients can query to see what servers are available to upload to
  • contains a DNS server which redirects clients [end user web browsers] to an appropriate tile server

Design

  • Different tileservers can be active at different times. When one comes online, they can browse tilesets available on other servers, and decide what they want to get
  • All peer-to-peer stuff is HTTP GET/POST, so that it's easy to implement using just Apache/Wget or equivalent
  • Servers can choose to be region-specific or layer-specific. Some load-balancing servers may choose to provide access to these through a different URL (e.g. spain.tah.openstreetmap.org directs you to servers which store spanish tiles)
  • Tilesets can be shared easily because they come with GPG signatures to prove that they were rendered by a "trusted" client [trusted by the keyserver]. Each tile server can choose a keyserver that it would like to handle the user-accounts.
  • Popularity/statistics server is optional, and designed to help the tiles servers decide which regions they might like to cache
  • Multiple "load balancing" servers can be used, each tile server can just decide which ones it would like to send updates to. The tile servers can also be browsed directly, if they have a fixed URL (e.g. fixed IP address, or dynaDNS)
  • No requirements for particular brand of software - each type of server can be programmed using the developer's choice of language, and there can even be different implementations of the same server type

Still need designing

  • Blank tiles (currently stored as database entries to save space)
  • Low-zoom tiles (not part of a 'tileset')

Transactions

Method Data passed
Upload HTTP POST Tile data
  • ZIP file
  • GPG file
Announce HTTP POST
  • Tileset number
  • URL of tile server which hosts it
Copy HTTP GET Tile data
View HTTP GET PNG image
Get key HTTP GET Key data (text)
Upload statistics HTTP POST Format not yet decided (but probably textfile?)
Browse statistics HTTP GET Format not yet decided (but probably textfile?)
Ping HTTP POST?
  • URL
  • which region covered
  • bandwidth available