6 ms·
IPFS doesn't help - you still need a store-and-forward architecture for messaging, so you might as well use that for images too. IPFS is not a store-and-forwar
by vertex-four 6y ago
IPFS doesn't help - you still need a store-and-forward architecture for messaging, so you might as well use that for images too.
IPFS is not a store-and-forward architecture; a file does not get automatically stored by the system, so when the sender disconnects, the file is no longer accessible. There's "solutions" to this, like Filecoin, but nobody wants folks to be paying to upload images.
Or, in other words - the problem IPFS solves is peer discovery for a given hash, not storage. In Matrix, you already know who your peer is - it's whoever sent you the message referencing the image.
- rglullis 6y agoMy idea was more in that every p2p node of Matrix can also be a IPFS server, and be used to pin all of your own media + a small cache of your contacts/group media. You wouldn't need to save all of the media your homeserver is dealing with, but you still could be reasonably sure that your node would be able to find all media you are supposed to access. Given that the post talks about libp2p and how libp2p's main driver is IPFS, it seemed reasonable to think that if you are adding Dentrite to your browser you might embed an IPFS server as well.
- vertex-four 6y agoBut if you're doing that then those nodes could also implement the store-and-forward aspect of p2p matrix, which comes with its own non-IPFS discovery and thus solves the discovery problem. libp2p is what IPFS is built on, not the other way round.
- rglullis 6y agoI think I am failing to get my idea through. I am thinking more in the sense of having IPFS as a way to increase redundancy of nodes that might be able to serve some media. Yes, discovery is not an issue for matrix. But p2p matrix on its own is not able to say "oh, your contact is sending you a message that contains a 10GB file, let me see if I can find other nodes that have this file already and get it from the swarm" 10GB is an exaggeration, but picture a group sharing hundreds of silly videos a day and you already can distribute the load quite a bit, no?
- Groxx 6y agoAnime-over-IRC can hit 10GB files pretty easily. I wouldn't label it an exaggeration so much as "uncommon". I do like the idea of automatically deduplicating every shared gif tho, which would happen automatically since it's content-addressed.
- vertex-four 6y agoYes, possibly this could be an optimisation; although then you get to worry about leaking information about your group's contents to the world - anything you send, other clients in your group will ask random servers on the internet for, by a globally identifiable hash. In the best case, this just leaks my friends' meme sharing habits - in the worst case, this announces to the world "I am in a group sharing materials that my Government thinks are dangerous". If someone posts an original file to a public group and a private group, then anyone who downloads that file who isn't in the public group obviously knows that person well enough to be in a private group with them, leaking group membership metadata. And so on. Random identifiers for each instance of sharing a file to a group would thus be needed, reducing the usefulness of this optimisation quite a bit, where e.g. using the results of the group's p2p matrix discovery mechanism as your peer list to download blocks from has much the same results.
- rglullis 6y agoYou are right about the problem of leaking metadata - just by asking for the file reveals to the world that you know about it. However, this is something that can be fixed on IPFS itself, and I believe it is even in their roadmap: the idea of adding "friend peers". Your IPFS node could ask for sensitive files to this privileged list of nodes only. So, your client can have a simple logic: if you have e2e encrypted message with IPFS-linked media, ask only the group member peers about the contents of the file. Messages that are not e2e (or marked as non-sensitive) can be asked to the global IPFS swarm.
- vertex-four 6y agoSure, if IPFS gets that feature, maybe it's worth it. (Although maybe not - at that point IPFS is just an overweight tooling for downloading files from a list of known peers block by block.) I wouldn't hold my breath though.
- viraptor 6y ago> + a small cache of your contacts/group media This idea always sounds interesting and dangerous to me. There's a lot of content you really don't want to be a provider for for legal and other reasons. Caching it for yourself is one thing - public distribution is another.
- rglullis 6y agoYeah, I stopped development of one project due to this: https://news.ycombinator.com/item?id=22246797 https://news.ycombinator.com/item?id=22246797