t-rex-tileserver / t-rex

t-rex is a vector tile server specialized on publishing MVT tiles from your own data
https://t-rex.tileserver.ch/
MIT License
545 stars 68 forks source link

S3 cache support #222

Closed arbakker closed 3 years ago

arbakker commented 3 years ago

See issue: https://github.com/t-rex-tileserver/t-rex/issues/169

Hi,

Here's an working implementation for S3 backed tilecache in t-rex. I am not sure if the solution in this PR is ready for master, mainly because of how the S3 write and read futures are resolved. This is done by using the sync method (available in the rusuto lib up to version 0.42). I suppose ideally the futures are resolved asynchronous, but I did not find a way how to do this (my experience with Rust is fairly limited).

Do you have an idea how to solve this, or what could be an acceptable solution?

Also the tests need to be improved to use a mock library, currently a S3 service is required to run for the test to run succesfully...

Will off course appreciate any other feedback on the PR as well.

Thanks for your consideration!

pka commented 3 years ago

That's really great - one of the oldest feature requests! I didn't have time for a review yet, but generally I'm fine with a synchronous implementation. I'm planning to asyncify the seeder anyway and can have a look at the options then.

Regarding the CI failures:

pka commented 3 years ago

Thanks a lot!

arbakker commented 3 years ago

Your welcome, thanks for maintaining the project 👍