HNHacker News
TopNewBestAskShowJobs

hyperknot

1,249 karma · joined August 14, 2015

founder of MapHub: https://maphub.net/

personal website: https://hyperknot.com/

email: zsolt@maphub.net

submissionscomments
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
Yes, Versatiles is a nice truly open project! One of the long term plans for OpenFreeMap is to migrate to Shortbread + Versatiles styles.
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
Thank you for sharing this, I'll make a issue about both.

The Vatican situation is trickier than you'd think, as it's on country level, while Rome is on city level, and naturally you'd want to give countries a priority over cities. Like on low zooms you only want to show countries, then as it gets closer you show cities. Well, except for Vatican.

hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
Yes, MapLibre is the gold standard now.
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
The Linux kernel's filesystem cache is actually really efficient at doing this. I doubt we could come up with a nginx scripting solution which could be equally efficient.
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
The whole extract_mbtiles.py file is 97 lines of code. This contains parsing MBTiles, writing metadata and some CLI specific lines. It's actually quite a concise script for doing this while taking care of the hard-link limits.
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
I've literally just launched it.
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
On the main page I disabled scroll zoom, because it hijacks your scroll and literally you cannot scroll through the map. It makes sense for full-screen maps only.

Of course, you have 100% control over exactly what controls you configure with MapLibre, when you set up your app.

hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
My main project is MapHub, it gives me my income. It's not an income like you'd get in a FAANG job, but still, I'm running it for making a living.

For MapHub to work, I had to invest in my own tile server infrastructure: there is no way I could have made MapHub financially profitable with a 3rd party tile provider. So I kept iterating and iterating on the tile server infrastructure and after 9 years I arrived at a state which was worth open-sourcing.

I'm happy if this project gets to the point from sponsorship where my hosting bill is covered ($175 per month), but it doesn't have to be financially successful on its own.

I'll keep working on it because it's part of my main business, not because I beg for donations.

hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
The thing is that hosting this really isn't that expensive. My first GitHub Sponsors goal is to reach $175 per month, which would cover the hosting on Hetzner. Of course this cost can grow if the project gets more popular, but it's a good start!

I honestly believe this project can cover $175 per month eventually.

Of course there is the countless hours which went and which can possibly go into this, but to cover the hosting is still meaningful.

hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
Yes, PMTiles with the Caddy plugin is very similar to nginx + Btrfs.

At that point, the difference between the two projects is mostly which schema is being used.

hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
Thanks a lot, I didn't know about it! I also liked the fact that Btrfs is probably super well tested in the Linux kernel by now.

btrfs.openfreemap.com just a public Cloudflare bucket, no idea why it might be slow.

hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
I'd recommend at least 200 GB.
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
If you know the tile numbers, you can just copy them out of the Btrfs image.
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
I think both solutions could easily saturate a 1 Gbps line. I benchmarked Btrfs + nginx and it could do 30 Gbps, which doesn't really make a difference if your server is 1 Gbps only.

The fact that there is no service running was the more important for me. Mostly for security and bugs. I had so many problems with various tile servers in production, they needed daily restarting, they had memory leaks, etc.

Basically I wanted to go nginx-only for security and to avoid tile server bugs.

hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
Wow, now that's an ambitious project! I wish you a lot of success with it!
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
Yes, I think it would. Have a look at the extract_mbtiles script: https://github.com/hyperknot/openfreemap/blob/main/modules/t...
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
They are providing the building blocks for making a self-hosted vector tiles server, they don't actually host the tiles.
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
No, the ping is 150 ms to us-west-2, and the tiles load in like 5 seconds on a cold start. Of course we cannot test cold start on HN comments because HN is the definition of hot :-)

I can imagine workers to be fast, it's the range requests which are super slow. It's also outside of your control, it depends on how Cloudflare and S3 handles range requests to 90 GB files.

I think if you could make PMTiles split into files <10 MB, it'd be perfect with range requests.

hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
What you need is a bike specific style for OpenMapTiles schema. Maybe you can find it on GitHub. Once you have the style, you can use Maputnik to tune it to your liking like on this link: https://maputnik.github.io/editor/#0.84/0/0
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
Thank you so much for your donation, it's appreciated!
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
They are providing the building blocks for making a self-hosted vector tiles server, they don't actually host the tiles.
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
Yes, you need a dedicated server with 128 GB RAM to generate the tiles. For hosting the tiles, you can use anything with 300 GB disk space, CPU is not important.
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
Yes, exactly, it's to save space. For example there is one such tile for "ocean", which covers 70% of earth.

In total, there are 271 million hard links. So out of 300 million files 271 are hard links!

The file system limit is 64k hard-links for the same file, so I have to handle the case when it's reached and then start a new file for the next 64k.

hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
Thanks, I've thought about it and rewritten the whole donations / sponsorships / support plan section. What do you think?
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
That's great to know! I know of one story where someone got terminated on Hetzner because of the bandwidth but it turned out he was also running a Tor node.
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
Someone making a Docker image from this. Instead of using Fabric's commands like c.sudo('git clone ...') it'd use the RUN commands.

I think it would be quite a straightforward task to transform it into a Docker file. I'd be happy to link to it on GitHub.

hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
This is totally customizable and the house numbers are already present in the original data, it's just not displayed in the default styles. You can customize the style by using the Maputnik editor, house numbers are visible in the "Inspector" view. https://maputnik.github.io/editor?style=https://tiles.openfr...
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
Thank you very much, and also thank you for your donation!
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
Yes, I was thinking about that, it might actually be a good idea. Provide a premium service with SLAs, while providing the SLA-less service for free, with two pool of servers.
hyperknot··on Show HN: OpenFreeMap – Open-Source Map Hosting
So Protomaps is a really full stack map platform, they are competing with kind of like 3-4 projects at once:

- There is the Protomaps schema. It's competing with OpenMapTiles and Shortbread (https://shortbread-tiles.org/)

- There is the Protomaps file format. It's competing with MBTiles and say Btrfs images in OpenFreeMap.

- There is the Protomaps styles. It's competing with OSM Liberty and OSM Bright styles (https://github.com/maputnik/osm-liberty)

- There is the way to host the tiles, on CloudFlare workers, range requests, etc. It's competing with MBTiles servers or OpenFreeMap's nginx servers.

About getting abuse, how do you imagine it gets abuse? It's a static file showing OpenStreetMap data.

I mean traffic is the only thing what can be a problem, but I think Hetzner should be good till 30-100 TB per server.

← PreviousPage 3 of 7Next →