3 ms·
I don't think this is ultimately an IFPS problem. How I've always understood IPFS is the protocol being a decentralized blob storage. You would use it in place
by yason 7y ago
I don't think this is ultimately an IFPS problem. How I've always understood IPFS is the protocol being a decentralized blob storage. You would use it in place of a CDN, to share files, or other building blocks for something higher-level. This is in contrast to browsing where there are established semantics on addressing absolute and relative URIs, and clustering relevant content under hierarchical addresses in the URI path.
The author insisted on doing this on bare IPFS but I think this is (vaguely) analogous to building a website based on IP addresses and port numbers, not URIs. To the point: the semantics just aren't there.
I could imagine an IPFS based web site being built with a local URI resolution map as part of the bundle of objects that is the web page. The sub pages would refer to symbolic URIs like before but the browser would also download a site map that links URIs to actual hashes of the latest revision, and resolve references like "foo/bar.html" or "/root/foo.html" based on the map. Or a proxy could do this transparently, translating URI requests to hashes and fetching data directly from IPFS, then serving it back to the browser as if it was downloaded from "/root/foo.html" instead of "ipfs://50ad443758222efea0286f3a94db2c25".
The top-level entry to the web page would basically be this URI resolution map which, as content-addressable, would effectively refer to a single revision of the web page. This could be implemented as a separate URI scheme, like ipfs-uri://bb9f6cbcc28829b57dd25102f67b9d37/main/news.html where ipfs://bb9f6cbcc28829b57dd25102f67b9d37 would point to the URI map and the URI handler would resolve the relative URIs such as /main/news.html based on the offered mappings.
But all this does require extra lifting from the browser or a proxy. I don't think IPFS as designed is feasible to replace something like HTTP which was explicitly meant to work with URIs.
- nybble41 7y agoIPFS already supports path-based lookup, starting from a hash which identifies a directory tree. For example, this is a valid IPFS URL which renders as a directory listing: https://gateway.ipfs.io/ipfs/QmYXYP1J346Pic6UHV5AkUy1UgabtJVAZU254ha4KLGBfJ/series/Belisarius/ https://gateway.ipfs.io/ipfs/QmYXYP1J346Pic6UHV5AkUy1UgabtJV... Normally that link would retrieve the content via a public IPFS gateway, but if you install one of the IPFS browser extensions you can have URLs like that automatically redirected to a local IPFS client. As long as you stick with relative paths, it's not difficult to host a static website on IPFS. You can even configure a CNAME to point to a public gateway with special DNSLink TXT records so that visitors don't need to know the hash of the root directory. The end result looks just like a normal HTTP URL.[1][2] [1] https://docs.ipfs.io/guides/concepts/dnslink/ https://docs.ipfs.io/guides/concepts/dnslink/ [2] https://developers.cloudflare.com/distributed-web/ipfs-gateway/connecting-website/ https://developers.cloudflare.com/distributed-web/ipfs-gatew...
- autonome 7y agoYes, IPFS addresses some of the use-cases of HTTP while solving other problems where HTTP falls short. It isn't a complete drop-in replacement, but does set up a foundation for an internet that will last longer and (at some point) perform better across varying network conditions. > but I think this is (vaguely) analogous to building > a website based on IP addresses and port numbers, not URIs. IPNS is a naming solution designed to address this: https://docs.ipfs.io/guides/concepts/ipns/ https://docs.ipfs.io/guides/concepts/ipns/ It's not super fast right now, but there's some work happening now to make it much faster. ENS, the Ethereum name system, is also an emerging way of doing this. > basically be this URI resolution map IPLD is a data model that works with IPFS to address the use-case you're describing, where you have a permanent reference to a mutable set of data: https://ipld.io/ https://ipld.io/
- yason 7y agoAll right so there is already work ongoing to solve these problems, and that work is built on top of IPFS instead of extending the base protocol, and the author who just insisted using plain IPFS was thus suffering from expected difficulties as IPFS really isn't the direct answer to that particular usecase.