3 ms·
IPFS provides nice stable links to media, and there are HTTP->IPFS gateways if needed. That seems useful for embedding content on multiple apps/sites. Yeah it h
by hot_gril 3y ago
IPFS provides nice stable links to media, and there are HTTP->IPFS gateways if needed. That seems useful for embedding content on multiple apps/sites. Yeah it happens to fit NFTs particularly well, then again we all know what BitTorrent is known for. And yes I agree IPFS has some UI problems.
Would BitTorrent also be suitable for hosting embeddable content? I haven't seen that yet. A magnet URL is mainly a file hash and doesn't seem to encode a particular peer server, kinda like IPFS. But every time I've torrented Ubuntu, it's taken half a minute just to find the peers.
- mvdtnz 3y ago> IPFS provides nice stable links to media Anyone who has tried to torrent an old movie or lesser-known television show knows this is simply not true.
- hot_gril 3y agoI mean it's not like HTTP where all URLs are tied to a particular webserver and can even be changed on that server. If someone different starts seeding, you'll get the same data again at the same URL, with built-in checksumming.
- adamzochowski 3y agoThat is something I wanted to know, does IPFS guarantee that same two files have same two IPFS URLs / hash links? Otherwise, someone sharing same data again, because it will be in different IPFS folder won't be actually discoverable as same data.
- fwip 3y agoYes, IPFS hashes individual "blocks" (pieces) of files. If two files have the same content, they will share block hashes.
- hot_gril 3y agoYes, a file's hash is only based on its contents. The way I understand it, a file doesn't really live in a directory, it's more like a directory (which is a kind of file itself) references files. So the same file can be in two directories, yet it'll have the same URL/hash. And if you "add" files to a directory, you're really uploading a separate copy of the dir that'll have a different hash. I checked myself on this, but someone else might want to check me cause I'm not an expert.
- wuiheerfoj 3y agoThis is generally true, though it’s possible to encode the same data into a slightly different shaped DAG to optimise for eg video streaming performance afaiu (balanced vs imbalanced). UnixFS vs raw bytes may also be different but I’m not 100%
- hot_gril 3y agoFrom the fs's point of view, these are different file contents. But yeah, there's nothing stopping you from pinning something different that looks the same to a person.
- wuiheerfoj 3y agoOnce decoded they would be the same file contents - imagine one DAG where the depth is log(n) and it’s a perfectly balance tree, and another where the depth of the left-hand branch is 1, right hand branch contains another subtle with left-hand size 1 etc etc etc. The leaves are the same in both cases, so the file contents are the same, though the latter is quicker to stream (though not to verify) and the CIDs will be different
- mikegreenberg 3y agoCaveat: The other comments mention the file's contents being the only dependency on the hash, but the algo used to hash would also need to be the same. If the hash algo changes in two cases, the same content would have a different hash in those two cases.
- hot_gril 3y agoIn this case, would pinning the file make it accessible from either hash? I'd expect it to, but idk, I've only ever seen sha256 hashes on IPFS.
- jaccarmac 3y agoKinda. Shooting from the hip based on fuzzy gatherings from IPFS usage here, but as I understand it: The leaf-level data blocks will be shared between the Merkle trees, but at least the tip (the object a given hash actually refers to) and maybe some of the other structural information will be different.
- ranger_danger 3y agoBasically it depends on specific settings that can be changed in the client as to how the individual block pieces are encoded and therefore what the resulting hash ends up being. So no there's no inherent guarantee but you may get lucky with some copies of the same file.
- rakoo 3y ago> Would BitTorrent also be suitable for hosting embeddable content? Same as IPFS: gateways can exist. It's not specific to Bittorrent, or IPFS. > A magnet URL is mainly a file hash and doesn't seem to encode a particular peer server, kinda like IPFS. Magnet links can include a HTTP server that also hosts the content
- hot_gril 3y agoI'm sure a BitTorrent gateway can exist, but I'm wondering why it doesn't seem to "be a thing." I've never seen one used, nor do I see an obvious public one when searching. Whereas IPFS gateways are so mainstream that even Cloudflare runs a public one.
- rakoo 3y agoIt's because of the kind of content that is shared. BitTorrent serves a lot of content you are not allowed to redistribute, so having an open gateway immediately puts you at risk of aiding the distribution of content. But it does work, someone even made something native to browsers so browsers themselves can share content: https://webtorrent.io/ https://webtorrent.io/. There are even fuse "gateways" to make it native to your computer and pretend the files exist locally: https://github.com/search?q=bittorrent+fuse&type=repositories https://github.com/search?q=bittorrent+fuse&type=repositorie... IPFS doesn't seem to be used for that kind of content much, it seems to be targeted more towards web-native content (html pages, images, that kind of stuff). It's probably safer for Cloudflare to run this.