- loads a template
- creates a layergroup on the fly
- checks for view center+zoom or bounds
- if not found it tries to estimate them
- if fails it falls to default bounds value
- returns an static image tagged with a surrogate key
- Extends the problematic fake request in templates
- Picks the value in waterfall, this must be improved because:
1. It does not make sense if there is no layers with limits
2. If we want to include it always without considering the layer type
we can do the operation in parallel
Move setDBAuth and setDBConn to PgConnection entity
- It uses cartodb-redis to retrieve datasource configuration
Start using it in ServerOptions, TemplateMaps and QueryTablesApi
QueryTablesApi don't receive anymore the connection/credentials
- It will always use an authenticated query to retrieve last update
- That will allow to query affected private tables last update
- Token validation is done against the template
- Template is always extended with default values for auth and placeholders
- MapConfig is extended, in order to validate auth_toknes, with template info:
- template name
- template auth
- No more locks to create, update or delete templates
- Trusting in redis' hash semantics
- Some tradeoffs:
* A client having more templates than allowed by a race condition
between limit (HLEN) check and creation (HSET)
* Updating a template could happen while the deleting it, resulting in
in a new template
* Templates already instantiated will be accessible thrught their
layergroup so it is possible to continue requesting tiles/grids/etc.
- Authorization is now handled by template maps