-
Notifications
You must be signed in to change notification settings - Fork 108
Spec refining: Relative paths in IPLD #1
Comments
Would these relative paths be restricted to the current object? |
We could either restrict them to the current object or as in the proposed in the example, for external objects |
|
here's some fun ---
# obj1
a: ../
# what does /ipld/<obj1-cid>/a/a/a/a/a/a/a/a/a/a point to? ---
# obj2
a:
aa:
aaa: ../../../a/aa/aaa
aa:
a: ../../
aa: ../../
aaa: ../../
---
# obj3
a: <obj2-cid>/aa
aa: <obj2-cid>/a/aa
aaa: <obj2-cid>/a/aa
# what does /ipld/<obj2-cid>/a/aa/aaa/a/aa/aaa/a/aa/aaa point to?
# what does /ipld/<obj3-cid>/a/aa/aaa/a/aa/aaa/a/aa/aaa point to? |
I'm sure we can craft much worse things. but just a taste of what this enables. It's like a DAG |
If we allow the traversal across object boundaries these paths are not unambiguous anymore. Look at this example: # AAA1
name: cool
value: 1
great: BBB/value
# AAA2
name: cooler
value: 2
great: BBB/value
# BBB
name: secret
value: ../value In this case # AAA3
name: something
great: BBB/value then we look at
|
I do understand your complexity concerns and I do share your fears, but at the same time I think that there is something great in this, so let me be the devil's advocate On the general idea of relative paths
On errors:
@dignifiedquire in your example, the BBB object will have an invalid path it taken individually. If linked from AAA1 and AAA2 it will not. The main reason why I would like to have something like that is to avoid having to specify relations through linking through time. For example if I have an RDF object where A links to B and B to A and this relation is not defined by time, it would be great to timestamp this relation at time 0. This would make authenticating RDF much simpler than creating OP-logs. This would be something like this: Implicit (relative paths that are local)hashX
Explicit (relative paths across objects)
|
I'm strongly against allowing relative paths between objects for several reasons:
|
(( Yeah. relative links may be a siren feature. So attractive and powerful, but tons of complexity introduced. )) |
(I am personally not arguing for or against, I just want to make sure we dont cut off features) |
In the previous call (ipfs/team-mgmt#181, see the results here: ipfs/team-mgmt#181) we have concluded that:
|
... from a child object to a parent object. |
Updated, thanks @Stebalien |
Closing due to staleness as per team agreement to clean up the issue tracker a bit (ipld/team-mgmt#28). This doesn't mean this issue is off the table entirely, it's just not on the current active stack but may be revisited in the near future. If you feel there is something pertinent here, please speak up, reopen, or open a new issue. [/boilerplate] |
(reposted from ipfs/specs#112)
Originally in interplanetary paths I included the possibility of having relative paths.
Here I am proposing to add in the specs (and in the js-ipld implementation), the ability to resolve relative paths.
Having relative paths saves space (
../
, instead of a full hash), helps avoiding splitting things in multiple pieces (../
instead of creating a new object) and finally, allow circular relationships: merkle graph!cc @jbenet, @mildred, @dignifiedquire
The text was updated successfully, but these errors were encountered: