Why does the PBNode have a links and data section? #29
Comments
|
The current system allows one to find related blocks without understanding the block data itself (unless the block is encrypted) but I can't see how this would be useful (and the paper doesn't explain it). |
|
because the user may put arbitrary data there that ipfs would not be able to understand. do you see the links below? |
|
The question was why is this baked into the node itself? That is, why not have IPBS (interplanetary block storage) and build things like ipfs on top of it. A type field that says "this is an fs object" would be enough for ipfs to look into the data section and interpret it as a directory/file. Basically, why encode the DAG at the protocol layer (loose terminology) instead of the application layer. |
|
that's the point of IPFS. to create one clean merkleized transport that layers on a universal path namespace, interoperable everywhere. and to do that, we need to be able to understand one thing: the things you want to be merkle links. i understand your question + motivation, i'm saying that the underlying "IPBS" does exist (it's just bitswap over our libp2p, without IPFS proper). but the important proposition here is a "thin waist" of authenticated data structures |
|
I think this is the piece I was missing:
So if I ask for I still don't understand why you didn't just split the roles like unix:
My primary concern is mapping ipfs onto a filesystem. In the proposed versioned file system, not all of the objects can be represented purely as files or directories (which is noted in the paper). This means that my version control application can't just rely on the filesystem abstraction but needs to understand ipfs. So I guess a better question is: why both (data + links) instead of either (data OR links)? Efficiency? |
|
Note: I understand how storing a namespace and some data under the same named file can be useful; it's how the web currently works (where index.html stores the data and the directory stores the namespace). I'm just wondering if this is sufficient motivation to break with the standard filesystem abstraction. |
|
Short answer (I can expand later): Because this is one thing unix got wrong. Directories should've been files too. Files should've been able to link to other files. HTML/HTTP got this right. Took me years to understand this. Think about it this way: a traditional unix file system is an application of a generalized datastructure web. It's a shame we have to have separate files and dirs in our unixfs to deal with legacy unix expectations, but it's not too bad in practice. consider this: in git, commits, trees, and blobs are all "objects". Same in ipfs. It's just that our "blobs" can link to other blobs. (Or anything). — On Mon, Sep 14, 2015 at 5:21 PM, Steven Allen notifications@github.com
|
|
Oh and the big win is path traversals over arbitrary other linked datastructures, like this: $repo/branches/master/parent/parent/tree/foo/bar/baz/10 $torrent/pieces/5 $tar/foo/bar/baz/mode $bitcoinblock/parent/parent/txns/12/inputs/0 — On Mon, Sep 14, 2015 at 5:21 PM, Steven Allen notifications@github.com
|
|
You make a compelling case. |
|
the tar thing you can try out today: note: I prefixed each of the entry names in the tar with a |
|
This issue has been moved to https://discuss.ipfs.io/t/why-does-the-pbnode-have-a-links-and-data-section/459. |

Stebalien commentedSep 11, 2015
That is, why not just have a data section or data and type sections and store the links inline?
The text was updated successfully, but these errors were encountered: