Skip to content
This repository has been archived by the owner. It is now read-only.

How can IPFS support cyclic content? #129

Closed
magcius opened this issue Jun 2, 2016 · 6 comments
Closed

How can IPFS support cyclic content? #129

magcius opened this issue Jun 2, 2016 · 6 comments

Comments

@magcius
Copy link

magcius commented Jun 2, 2016

Let's say I want to host a website on IPFS and have two web pages, and both of them link to each other.

Since IPFS is content-addressed, that means that each page's link would have to be a link to the other page's hash, correct? And since the other web page links to me, I have to find two dependent fixed points of hashes...

I didn't see any way of doing name to content mapping in IPFS, which is the system that Freenet, etc. all use to solve this problem.

@magcius
Copy link
Author

magcius commented Jun 2, 2016

Yes, I saw that, but since you only get a single blob per name, I didn't think it was intended for this use case, but simply to point to an index file. Additionally, you don't get content permanence — the thing I link to would be the latest version of whatever I publish at my webpage, not the hash at the time of upload.

I was imagining a system where: the entire bundle was the content-addressed unit, and links happened in there based on name. So my website would be the content-addressed, hashable unit, and all HTML pages, bundled resources, etc. would be identified by relative links inside that.

But maybe that's not how IPFS wants to work.

@harlantwood
Copy link

harlantwood commented Jun 2, 2016

Works as long as you have relative links, eg: https://ipfs.io/ipfs/QmavE42xtK1VovJFVTVkCR5Jdf761QWtxmvak9Zx718TVr/index.html

@whyrusleeping
Copy link

whyrusleeping commented Jun 2, 2016

@magcius relative links in webpages work just fine. the ipfs.io webpage is actually served through ipfs via /ipns/ipfs.io

@wking
Copy link

wking commented Jun 2, 2016

On Thu, Jun 02, 2016 at 10:33:45AM -0700, Jeromy Johnson wrote:

@magcius relative links in webpages work just fine. the ipfs.io
webpage is actually served through ipfs via /ipns/ipfs.io

This breaks the “my IPFS tooling can walk the graph” without teaching
your tooling about HTML. But if the HTML links only point inside a
directory structure, then being able to walk an IPFS directory
structure is sufficent for a complete snapshot and @magcius' content
permanence.

@madavieb
Copy link

madavieb commented May 23, 2017

This issue has been moved to https://discuss.ipfs.io/t/how-can-ipfs-support-cyclic-content/320.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants