tilezen/xonacatl

Name: xonacatl

Owner: Tilezen

Description: Tile layers server

Created: 2016-10-14 19:32:50.0

Updated: 2018-04-27 11:04:47.0

Pushed: 2017-11-08 16:50:48.0

Homepage: null

Size: 29

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Xonacatl

Xonacatl is a “layers server”, which takes requests for a subset of layers available and requests all the layers upstream, stripping out the unwanted layers when writing the response back to the client.

For example:

  1. The client requests a tile /buildings,water/0/0/0.json
  2. Xonacatl makes an upstream request for /all/0/0/0.json
  3. Xonacatl ignores anything in the GeoJSON response which isn't for buildings or water layers.
  4. The client reads back a tile containing only the layers they asked for.
Why?

Custom layers can be very helpful in reducing tile download size. Some layers, particularly buildings and landuse, can be large at certain zooms. Downloading this data unnecessarily can make apps feel less responsive.

On the other hand, creating tiles with custom layers is time-consuming and resource-intensive. It's much faster and cheaper to “cut out” the layers which the client wants from a tile containing all the layers. In fact, this is how tileserver works. Unfortunately, custom layers are customised, and the greater variety of their URLs means that cache hit ratios are reduced - on top of the additional latency of returning the request to the origin server.

Xonacatl is an attempt to do this at the “edge”, closer to the client and taking advantage of as much “edge” caching as possible.

Why “xonacatl”?

Xonacatl is Nahuatl for onion, and tiles are like onions.

Installing
GOPATH
et -u github.com/golang/protobuf/proto
et -u github.com/tilezen/xonacatl/xonacatl_server
nstall github.com/tilezen/xonacatl/xonacatl_server

To update the generated protocol buffers code, you will need to run go generate and have the protobuf Go compiler plugin installed:

GOPATH
et -u github.com/golang/protobuf/protoc-gen-go
=$PATH:$PWD/bin go generate github.com/tilezen/xonacatl

As is the Go convention, the generated source code is checked in. Unless you need to alter the original protocol buffers definiton, it shoud not be necessary to install the protoc-gen-go tool, or run go generate.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.