-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPLD Pathing Redux #97
Comments
Overall, this yields a much, much simpler pathing system, and the shape of the data is almost exactly the same as what we currently have. I'd hate to change the format yet again, but this is very much a "now or never" type of thing (before lots of data exists with this), and many people are asking to do this. |
I like {
"link": {"/": "Qmfoo"},
"mode": 0755
} |
I quite like the whole idea of dropping extra link properties and have just plain links without other properties. It makes for a simpler design and is much more simple to use. I would compare it to XML which has node properties and node content I'm not sure about the & however. Perhaps we should allow for escaping it, or perhaps we can just live with the fact that we might get extra links when we meant none. I don't think that would be a problem. |
In other words, this is the "direct-link" that I originally thought IPLD had? and there is no link properties, there are just properties and the higher layer will know which ones are link properties? |
@Stebalien said
i'm ok with
there may be representations that would merit compressing: eg compress this is easy to achieve by stating:
i think that for simplicity, any
thanks, and thanks for pointing it out months ago. @nicola said
Yes, sort of. In essence, yes. but the difference is that in an object like: {
files: {
foo.jpg: {
link: {/: Qmfoojpghash},
mode: 755,
owner: jbenet,
}
}
} i would consider {
link: {/: Qmfoojpghash},
mode: 755,
owner: jbenet,
} the link object (not special at all, just a lose abstraction for the higher layer), and {/: Qmfoojpghash} the link value. Thus, we can guide people to create structures like that, when they want metadata. and, given we have the higher layers (which we all like and pointed out independently), we can still make things like this work:
or with FUSE or a kernel fs
in short, yes, everyone who wanted no link properties was right all along (we all were). and everyone who wanted properties in links (we all did) can still have them. (we can have our cake and eat it too). |
btw, the link object doesn't have to show up in the IPLD spec as a construct at all, this is more of a documentation / best practice thing for higher abstractions. |
Closing as these changes have been merged into the spec |
Remove link properties from CBOR tags as per #97
A week or so ago, @nicola @dignifiedquire @Stebalien and I discussed lots of IPLD things in detail.
Among them, we discussed pathing again. One result here was that we revisited the "two pathing delimiters" and link-properties problem. @Stebalien and I got to something in the end, and many approve (including @dignifiedquire and @diasdavid). @mildred i would be very interested in your thoughts. And I believe this is more in line with your original thinking too, or at least things you and I considered.
In the meeting we recalled many observations from previous conversations, including:
//
shorthand for/@link/
increases conceptual complexity{"@link": "hash"}
construction is getting around the problem that JSON does not allow representing a different value type natively (eg a link value). Other formats (CBOR, YML) do not have this problem.Right now we have:
Recalled and new observations where
{"$date": "2016-01-01"}
to represent other Value Types./foo/bar/baz
representing a unixfs directory traversal. (ie. the shape of the data, and without//
or/@link/
traversals)/@link/
a lot all over the place.We found a very nice middle ground between #1 in https://github.com/ipfs/ipld-examples/ and the current way to do things.
The proposal is to move to something like:
{"@link": "<hash>"}
to represent a Link Value, use{"&": "<hash>"}
/
is used for all traversal (local properties or link resolution)//
shorthandlink
or whatever other propety name they wish. this is not a reserved keywordTo be clear, this is what #1 proposed all along, which has been championed by many of us along the way. It took a while for us to discover all the subtle, intricate problems that emerged otherwise.
Why
@
instead of@link
:Why
@
? We did not want to use@link
because we do not want to have things like:Well then, maybe use
&
?We can use any symbol for the Link Value.
&
was proposed (and seems to be winning favor) because:@
is just a hold-over from JSON-LD.&
is commonly used across programming languages to describe "references"$
is overused and could create problems.However
&
may have problems:CBOR formatting simplification
@dignifiedquire mentioned that this significantly simplifies the CBOR formatting implementation. I'll let him describe more as I don't recall the comments very well.
The text was updated successfully, but these errors were encountered: