spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.92k stars 1.05k forks source link

Add support for self-hosting a map tile server #1632

Open Cadair opened 2 years ago

Cadair commented 2 years ago

With the new location sharing feature in Element it's possible to self-host a tile server for downloading maps. See https://matrix.org/docs/guides/map-tile-server

spantaleev commented 2 years ago

It probably makes sense to add it, but it doesn't seem like something that many users will run.

Reasoning:

Still, it makes sense in certain scenarios and for people who are prepared to pay the (storage, computing, maintenance) price for it. If anyone's willing on adding support for this to the playbook, it'd be great!

Cadair commented 2 years ago

I agree it's probably not going to get a massive amount of use, though I would say a bunch of these arguments can also be applied to Jitsi (resource hungry on large deployments etc).

I wonder if there is a way to proxy tile requests to somewhere else, so that all your HS users come from your homeserver rather than their local devices?

spantaleev commented 2 years ago

Perhaps a good solution is to take your data point, shift it a bit (or reduce the latitude/longitude precision a bit) and use that for getting the tile. At the same time, generate a few more data points (some nearby, some further away) and resolve all these tiles in a random sequence.

And then proxy all those requests through the homeserver, to anonymize the actual user doing them.

And then the homeserver can also rotate multiple tile servers, so that it doesn't give all the data to the same tile server (unless you trust the tile server).

I suppose various such things can be done to make things better.

robbyoconnor commented 2 years ago

I shudder at the amount of storage this would require

julianfoad commented 2 years ago

I've got a stand-alone role, which anyone is welcome to help integrate into this play book: https://lab.trax.im/matrix/map-tile-server-ansible . Discussion room: https://matrix.to/#/#matrix-map-tile-server:foad.me.uk .