Closed
Description
There are several sets of database fixtures needed for the tileserver to operate correctly. These include a variety of resources each with a different level of coupling to the tileserver Python code:
- Table definitions for the cache system
- Tile utility functions
- Function definitions that create tiles for certain layers (e.g., the
carto
andmaps
layers)
These need to be created for the tileserver to operate properly. However, there are a few factors to consider with this design:
- Some tile layers (e.g.,
paleogeography
layers) are defined in the Macrostrat repository. There is a two-way dependency between the tileserver code and that schema. - We've tried to automatically apply these fixtures on tileserver spin-up before, but we've had problems with table locks since we've run that SQL synchronously
- We've got a new migrations system that makes applying these fixtures potentially relatively simple, but it would be tedious to define a new migration every time tile layer definitions change
It seems like the right approach would be to either
- Move the bulk of this SQL to the Macrostrat repository, which would come at the cost of having the tileserver be in control of its own layer definitions
- Re-implement more of this code as static SQL called on-demand in the tileserver codebase (which would reduce some of the 'move-fast' benefits of having function-defined layers), and we'd still need to move the table defs etc.
- Figure out how to get the fixtures to run properly on tileserver spin-up.
- some combination of the above
Metadata
Metadata
Assignees
Labels
No labels