stateless tipg: remove `collection_catalog`
@bitner ci sta già lavorando.
Dal 16/3/2023.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Since the start of tifeature/timvt/tipg, we designed the application with having a list of the available collections/layers stored in the application State: https://github.com/developmentseed/tipg/blob/489f0243b0b4f0d46d12f06a1baf0bccc1d4232a/tipg/db.py#L83
This gave some advantages:
- cost of running the collection listing is only paid once (at startup)
- we know what are the available collection so we can raise useful error if the user input collection is not in the list https://github.com/developmentseed/tipg/blob/489f0243b0b4f0d46d12f06a1baf0bccc1d4232a/tipg/dependencies.py#L40-L43
- cheap collection filtering https://github.com/developmentseed/tipg/blob/main/tipg/factory.py#L439-L458
The collection_catalog is created at application startup https://github.com/developmentseed/tipg/blob/489f0243b0b4f0d46d12f06a1baf0bccc1d4232a/tipg/main.py#L65-L80 because we assumed it's a pretty costly process.
The problem then (as explained in https://github.com/developmentseed/eoAPI/pull/55#issuecomment-1471006644) is when you have changed in the DB (e.g new table) it won't show up in the application because the catalog is now updated.
Proposal
- remove
collection_catalog - create a clean SQL function which will list the collections
- the function should accept
id(to return only one collection),limit,offset,spatial_filterandtemporal_filter
cc @bitner
- Lingua principale
- PLpgSQL
- Stelle
- 224
- Fork
- 39
- Merge medio
- 2g 18h
- PR unite (30g)
- 6
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di developmentseed/tipg
-
New MLT vector formatAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
developmentseed/tipg#248 · 1 reazione ·
-
add support for JSONB column searchForse di nuovo libera @bitner l’ha presa 285 giorni fa e non c’è nessuna pull request aperta. Aperta
developmentseed/tipg#247 · 2 assegnatari ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
developmentseed/tipg#241 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
developmentseed/tipg#240 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
developmentseed/tipg#228 · 3 commenti ·