-
Notifications
You must be signed in to change notification settings - Fork 96
IPLD refining call 2 #181
Comments
Sounds good to me. Want to set up a time to talk about it on the sprint calls tomorrow? Maybe after libp2p? |
👍 SGTM |
Can we make it 1:30 hours after libp2p? (that works best for me) |
Might be a little late for @dignifiedquire: thoughts? |
I can make it whenever (thesis done). @nicola I assume you'll be in CSAIL? |
I can only make it right after the other calls. |
But if it doesn't work, no worries, meet w/o me |
I don't think I can make it that late I'm afraid :/ but I would be available right after the calls. |
@nicola You ok with having a call right after libp2p, then? Might be good to jump on the All Hands call at noon to schedule in person with the others. |
I can make it to the All Hands, but unfortunately I can't make it to after libp2p, we can still meet in all hands to decide future timing! |
IPLD meeting is happening 4pm Boston/NYC time (1h30m after the libp2p meeting) |
Sweet. Neither @dignifiedquire or I will be around for that; you can record it using Zoom, or just take notes. |
@nicola I would like to listen in, so please post info about how to join the call when you start (or can we use the same zoom link as the calls we just finished?) |
hey @flyingzumwalt at the end we asked on IRC if someone wanted to join and it was just me and @Stebalien discussing through:
We have been taking accurate notes about everything we discussed, I will be posting them soon in ipfs/pm (I am sorry that I did not check this earlier on :( ) |
Terminology
ResolutionsCyclesDo we let relative links introduce cycles? ConclusionNo. Pro
However, these can also be done at the application level (see below). Cons
Intra-Object relative linksDo we allow relative links within an object? ConclusionYes. ProsWithout internal non-cyclic relative links, one would need to break an object into a graph in some cases. For example, given:
With internal non-cyclic relative links, we can express the ConsWe should probably have a validation step that checks for cycles/invalid links. This is also one more feature to implement. AlternativesWhen writing this up, I realized that there is an alternative (besides do nothing). Specifically, we could allow some form of nameable sub-object. However, I feel that this is even more complicated and probably a bad idea. Inter-Object Relative LinksShould we allow relative links to traverse up through a parent. ConclusionNo. Pros
Cons
Unresolved QuestionsWhen writing this up, I came across a few unresolved questions. Inter-object relative links that don't traverse parentsWhat about inter-object relative links that never only traverse to child objects? These links would have a verifiable one-to-one mapping to absolute links (as in, they could be trivially replaced with absolute links). We could canonicalize all links when encoding an object but then we might lose some semantic information. This leads into the second question. Canonicalizing LinksDo we canonicalize all links regardless? Do we just make this an optional feature (leave the choice up to the implementation)? This would throw away some semantic information and may not always be possible (e.g., if you don't have a copy of the intermediate objects). However, this would make fetching objects faster. |
Application Level CyclesThere are (at least) two ways to do application level cycles. Adjacency ListDistribute a supplementary adjacency list to overlay the object. That is, one can write: {
this: { /* ... */ },
overlay: {
"a/b/c": "a/b", // A parent link
}
} Twin-NodeUse two nodes instead of one — one for out-links, one for in-links — and construct the logical graph at the application level. That is, given a graph such as: The application would produce: In the above graphs, |
@Stebalien thanks for writing this down! By tonight I should be able to add other notes (if there are any) |
Created a PR with the notes from the meeting #196 |
IMO not allowing cycles in documents is a big mistake. Real applications that would like to use IPLD don't always have nice DAGs. Also the two algorithms that you've given won't work for applications that have DAGs with duplicate node labels. Here I'm referring to node labels as hashes of the non-cyclic components of each node. That is, the content of a document with the links to other nodes in its strongly connected component removed. Nodes can have duplicate labels but have different connectivity information within a strongly connected component. As a simple example of documents that have identical structure, consider the following struct definitions in the context of a fine-grained software repository/version control system (this is what I'm planning on working on):
Clearly these two struct definitions have the exact same structure, so they should be hashed to the same value and thus have the same labels. In other words, structural equality is not equality for some applications. I have a rough idea of an algorithm that will work for applications with duplicate node labels. It is based off of De Bruijn indices from lambda calculus. Note that this algorithm would require edge labels (probably based off of the order of which the edges appear in the document). For applications that have multisets, this will not work. I believe that some combination of the algorithm given here: Let me know if you're interested in more details on the De Bruijn algorithm. Also I'd like to suggest that multisets should be added as a type in the JSON for IPLD. There are plenty of hashing strategies for multisets that can be found in academic papers. |
IPLD stakeholders should get together to agree on some pending refinement in IPLD. These issues are not necessarily new features but restrictions that we may have to specify in the spec to make it less ambiguous.
Partecipants are expected to be informed about the different issues, they should:
Agenda so far:
Other:
We can do this in the coming week or next
Ping @Stebalien, @mildred, @jbenet, @dignifiedquire, @RichardLitt
The text was updated successfully, but these errors were encountered: