Skip to content

SQL fixtures needed for tileserver operation #146

Closed
@davenquinn

Description

@davenquinn

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 and maps 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

  1. 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
  2. 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.
  3. Figure out how to get the fixtures to run properly on tileserver spin-up.
  4. some combination of the above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions