matrix-org / matrix-spec

The Matrix protocol specification
Apache License 2.0
181 stars 94 forks source link

Consider IPFS as an alternative to MXC for Matrix's file repository (SPEC-223) #98

Open matrixbot opened 9 years ago

matrixbot commented 9 years ago

Currently we use our basic mxc:// distributed URI scheme for sharing file attachments between matrix servers. This is a very naive system where you PUT files to your local HS, and then users in the room on remote HSes request the file from their local HS, which downloads and caches a copy on their behalf in order to decentralise the contents.

There are some problems here:

It's an interesting thought experiment to consider whether supporting IPFS URLs as well as MXC URLs in m.file (and similar) events would help with this. Clients which aren't IPFS-aware would need to go via an IPFS bridge; ones which are running an IPFS node would be able to go use IPFS itself.

Thoughts?

(Imported from https://matrix.org/jira/browse/SPEC-223)

(Reported by @ara4n)

matrixbot commented 9 years ago

Jira watchers: @erikjohnston @NegativeMjark @ara4n

matrixbot commented 9 years ago

(IPFS is http://ipfs.io and currently basically a P2P decentralised DAG-based global filesystem, a bit like S3 or similar - but evolving into a potential replacement for the web itself in terms of a decentralised place for arbitrary hypertext and anything could live: https://github.com/ipfs/ipfs. It's evolving to support storing arbitrary JSON content, and could sprout realtime JSON transfer behaviour in future).

-- @ara4n

matrixbot commented 9 years ago
  • No streaming file transfer (yet)

Since IPFS splits large files into smaller chunks it looks like it should be possible to stream files, that is have one node download a file while it is still being uploaded.

-- @NegativeMjark

matrixbot commented 9 years ago

A few questions:

-- @NegativeMjark

matrixbot commented 9 years ago

Will IPFS allow us to do ACLs?

-- @erikjohnston

matrixbot commented 9 years ago

@​markjh There are plans for a blacklisting service to block illegal content from participating nodes: https://github.com/ipfs/gateway-dmca-denylist @​erikj IPFS doesn't yet have a permission model, but it's a planned feature.

-- David Roberts

Mikaela commented 5 years ago
  • ...?

Otherwise I love the idea and have suggested similar to a lot smaller project (https://github.com/FruitieX/teleirc/issues/262).

Quick edit: I think IPFS would be a great idea for stickers (https://github.com/vector-im/riot-web/issues/2950) assuming they are like at Telegram so anyone can add them and they are public and there isn't a legitimate reason to remove them entirely (which I think would result to unhappy users).

swedneck commented 4 years ago

Recently i've learnt of some new projects building ontop of IPFS to fix the access control issues: https://textile.io https://blog.textile.io/ipfs-experiments-creating-ipfs-links-that-you-can-delete/