The bracketing was introduced to reduce the DDOS attack surface and
increase the cache hit ratio. This means that we could in theory do all the
magic of bracketing in the varnish (to keep the cache rate high), or we
could force the clients to do the logic. The problem with Varnish approach
is that it puts business-level logic into Varnish's brittle C-style
configs.
On Thu, Sep 17, 2015 at 11:58 PM, Brion Vibber <bvibber(a)wikimedia.org>
wrote:
Awesome sauce! Congrats to everyone who's been
working on this.
On Thu, Sep 17, 2015 at 12:26 PM, Tomasz Finc <tfinc(a)wikimedia.org> wrote:
== In Depth ==
Tiles are served from
https://maps.wikimedia.org, but can only be
accessed
from any subdomains of *.wmflabs .org and
*.wikivoyage.org.
Kartotherian
can produce tiles as images (png), and as raw
vector data (PBF Mapbox
format or json):
.../{source}/{zoom}/{x}/{y}[(a){scale}x].{format}
Just a note -- the scale factor is for high-density displays, which are now
standard on most phones and increasingly common on laptops (1.5x is common
on small Windows laptops with 1080p displays). However the available scale
factors are hardcoded, so you can't just take an arbitrary device scale
factor (window.devicePixelRatio in HTML5) and feed it in, as it might not
match and you'll get HTTP errors out.
I've got a provisional patch in for the example front-end which manually
brackets to the available settings:
https://github.com/kartotherian/kartotherian/pull/13
It'd be awesome to either expose the available scaling factors as a list
via JSON API, or move the bracketing logic into the server side so you can
send a query with your actual scale factor and get back one that will work.
(If available scaling factors depend on the layer source being viewed, this
might be more complicated.)
We would like to thank WMF Ops (especially Alex
Kosiaris, Brandon Black,
and Jaime Crespo), services team, OSM community and engineers, and the
Mapnik and Mapbox teams. The project would not have completed so fast
without you.
Seconded. :)
-- brion
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l