davenquinn/mars-tiler

Bravo

Opened this issue ยท 1 comments

๐Ÿ˜ first let me say that this work is incredible ๐Ÿ‘

It seems that you had to re-write a lot of code, and I'm sorry for this, I hope we can make it simpler in the future.

I see you are using postgres to store the Mosaic, and I wonder if you had a look at https://github.com/stac-utils/titiler-pgstac. This project is a bit different because we use STAC to store the asset within the db but it could be worth having a look. You'll also see that we don't use async code to access the db, this is because as the raster tiling part is non-async (GDAL) we didn't want to have blocking and async code mixed up. That's said I'll be curious to hear/see the performance you are getting.

Once again ๐Ÿ‘

Hi @vincentsarago, thanks for your kind words! I'm excited for the direction that these capabilities are going in. I have enjoyed peeking beneath the hood of the rasterio stack. There is awesome unfulfilled potential for planetary scientists!

Most of my extra code has been towards making an async version of the tiler. I frankly don't understand the core of many of the async/blocking issues, but I went forward because I was getting horrible performance for database queries (>1s for bbox queries that executed in ~40ms outside of the tiler stack) for some reason that I couldn't pin down with the initial sync code/sqlalchemy database access. I need to revisit that, because making the code async didn't really help much. There's a lot of inefficiency with the way things are organized right now.

I'd certainly like to harmonize this with STAC at some point, so I will look at that code. For now I just wanted to get something basic working. In the spring (hopefully) I will be seeking funding from NASA and JPL to continue and expand this work.