Live data from Hacker News

Show HN: mbtiles-s3-server – serve vector map tiles directly from mbtiles on S3

github.com

1–10 of 20 posts

Re: Show HN: mbtiles-s3-server – serve vector map tiles directly from mbtiles on S3

#2
This is pretty cool! Didn't know you can query SQLite databases from s3. I recently tried out PMTiles[1] to do something similar but it requires an extra processing step. Would anybody know the pros and cons of this vs PMTtiles?

[1] https://github.com/protomaps/PMTiles

Re: Show HN: mbtiles-s3-server – serve vector map tiles directly from mbtiles on S3

#3
post #2

This is pretty cool! Didn't know you can query SQLite databases from s3. I recently tried out PMTiles[1] to do something similar but it requires an extra processing step. Would anybody know the pros and cons of this vs PMTtiles? [1] https://github.com/protomaps/PMTiles

I also just learned this. Apparently range header works with S3 https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjec...

Re: Show HN: mbtiles-s3-server – serve vector map tiles directly from mbtiles on S3

#4
post #2

This is pretty cool! Didn't know you can query SQLite databases from s3. I recently tried out PMTiles[1] to do something similar but it requires an extra processing step. Would anybody know the pros and cons of this vs PMTtiles? [1] https://github.com/protomaps/PMTiles

I wouldn't recommend using any sqlite database direct on s3... You'll end up with a pretty high bill from all the operations.

Re: Show HN: mbtiles-s3-server – serve vector map tiles directly from mbtiles on S3

#5
This is great. Servers have been the weak link in the open vector tiles stack for a good while and an out-of-the-box recipe like this will make a real difference.

(For those running on bare metal, I knocked this up a few months ago - https://github.com/systemed/mod_mbtiles - which is an Apache module that does pretty much the same thing.)

Re: Show HN: mbtiles-s3-server – serve vector map tiles directly from mbtiles on S3

#6
I was wondering how this ran queries against SQLite files in an S3 bucket. Here's the answer - it's using some very clever Python ctypes code to implement that HTTP Range header trick from last year:

https://github.com/michalc/sqlite-s3-query/blob/main/sqlite_...

Here's the inspiration for that: https://github.com/phiresky/sql.js-httpvfs

Re: Show HN: mbtiles-s3-server – serve vector map tiles directly from mbtiles on S3

#7

This is great. Servers have been the weak link in the open vector tiles stack for a good while and an out-of-the-box recipe like this will make a real difference. (For those running on bare metal, I knocked this up a few months ago - https://github.com/systemed/mod_mbtiles - which is an Apache module that does pretty much the same thing.)

I've got an nginx version here too: https://github.com/durkie/ngx_http_mbtiles_module

Re: Show HN: mbtiles-s3-server – serve vector map tiles directly from mbtiles on S3

#8
post #2

This is pretty cool! Didn't know you can query SQLite databases from s3. I recently tried out PMTiles[1] to do something similar but it requires an extra processing step. Would anybody know the pros and cons of this vs PMTtiles? [1] https://github.com/protomaps/PMTiles

I wouldn't recommend using any sqlite database direct on s3... You'll end up with a pretty high bill from all the operations.

Do range requests against s3 work if you’re fronting with Cloudflare and aggressively caching? Could be more economical.

Re: Show HN: mbtiles-s3-server – serve vector map tiles directly from mbtiles on S3

#9
post #2

This is pretty cool! Didn't know you can query SQLite databases from s3. I recently tried out PMTiles[1] to do something similar but it requires an extra processing step. Would anybody know the pros and cons of this vs PMTtiles? [1] https://github.com/protomaps/PMTiles

The end goal of PMTiles is similar to SQLite-over-HTTP: SQLite is designed for access on local disk, and might make many requests for a single query, each incurring a HTTP roundtrip (could take hundreds of milliseconds). PMTiles is designed from the ground up for HTTP, so attempts to minimize the # of requests to 3 or less for any tile.

The extra conversion step is something I'm hoping to get rid of by building PMTiles writers into tiling tools directly.

Re: Show HN: mbtiles-s3-server – serve vector map tiles directly from mbtiles on S3

#10

Earlier quoted context omitted.

I wouldn't recommend using any sqlite database direct on s3... You'll end up with a pretty high bill from all the operations.

Do range requests against s3 work if you’re fronting with Cloudflare and aggressively caching? Could be more economical.

It should work directly against R2 - our S3 compatible object storage) w/ no egress fees: https://developers.cloudflare.com/r2/

Makes experimenting with things like this much cheaper.

(I work for CF)

Post reply on HN