Skip to content
This repository was archived by the owner on Jun 29, 2022. It is now read-only.

[WIP] IPLD Composites (formerly IPLD Generics (formerly IPLD multi-block types)) #126

Merged
merged 9 commits into from
Jul 16, 2019

Conversation

mikeal
Copy link
Contributor

@mikeal mikeal commented Jun 5, 2019

No description provided.

mikeal added 2 commits June 5, 2019 12:37
* fixed indentation settings in iaWriter :)
* added some language agnostic notes on implementations
Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really needs @warpfork to help us find a meeting point between schemas and types, or at least to agree that there is some place where they intersect and our various visions for these things is mutually understood and sane

@warpfork
Copy link
Contributor

I'm not sure this is a particularly direct response to any of the diff content, but it's on the topic space as a whole, so as a top level comment:

Perhaps one way we could consider tersely describing the contract of these things is:

function (LinkLoader, Node) -> (Node)

Such a definition is:

  • terse;
  • can lean nicely on the properties and enumerations we already established in the Data Model docs;
  • clearly points out this may be multi-block;
  • gives us a lot of nice structure to communicate what this feature is and is not meant to encompass.

It might not be literally what the code is doing in our implementations, and as documentation it also still needs surrounding explanation, but structurally, does this seem about right?

@rvagg
Copy link
Member

rvagg commented Jun 21, 2019

function (LinkLoader, Node) -> (Node) is conceptually accurate insofar as reads are concerned. Does that break down when you bring writes into it though? And therefore, is it even useful here as anything more than just a description for how traversal extended with these advanced types/generics?

@warpfork
Copy link
Contributor

warpfork commented Jun 25, 2019

The write side is a bit different, but if you dream of it being based around a NodeBuilder, it's not so different: function (Storer) -> (NodeBuilder): where Storer is a function that serialize nodes, writes them to disk, and returns their links, and it's used to take care of all the internal nodes.

(In go-ipld-prime, it'll be even more similar: function (Storer, NodeBuilder) -> (NodeBuilder), because the first NodeBuilder is used to define the memory representations used for the internal node. Although I should tag this as a "probably"; haven't written it yet.)

(Aside: I wrote a whole first draft of this comment based on function (Storer, NodeBuilder) -> (Node) before realizing I was doing too much in one step... that approach came out much worse. Such a signature, in addition to doing too much in one step, would've been fairly terrible on the eyes for documentation/explanation purposes -- f(a, b) -> (b) is nice because it makes clear implications about how an abstraction is staying the same on both sides; f(a, b) -> (c) says roughly nothing.)

But as to whether or not this is good as a description: well, maybe. I think we'll get most of the descriptive benefits from putting function (LinkLoader, Node) -> (Node) pretty high in the documentation, right under it's own "H1" tag... and maybe if we do document function (Storer, NodeBuilder) -> (NodeBuilder), it would be much further on down the page, under an "H3" tag of additional clarifying information, or possibly tucked in some notes and suggestions for implementers of new IPLD libraries in new languages.

@mikeal mikeal changed the title [WIP] IPLD Generics (formerly IPLD multi-block types) [WIP] IPLD Composites (formerly IPLD Generics (formerly IPLD multi-block types)) Jul 9, 2019
@mikeal
Copy link
Contributor Author

mikeal commented Jul 9, 2019

Big changes were pushed:

  • Removal of reserved property
  • Addition of “definition” section
  • Added “open problem” regarding fat pointers
  • Remove the entire operations section and moved, temporarily, to the README in the experimental implementation. It’s not yet ready to be spec’d in a language agnostic way.

@mikeal
Copy link
Contributor Author

mikeal commented Jul 9, 2019

I’m going to merge this in 24h if there are no objections.

@warpfork
Copy link
Contributor

I would prefer to move this to a design history document, write up some other learnings afterwards, and later make a fresher, more limited, and clarified doc for spec drafts.

I like all the changes in the latest set, but there are several things in this file that make me uncomfortable, particularly with merging it as a spec-track document:

  • There are several matters discussed in the doc that are interesting to our design process, but we haven't concretely proposed solutions to yet, nor necessarily are we even sure they're part of this topic. This is fine for design exploration notes, but not good for a spec document.
  • We have not resolved that this new name is by any consensus superior to the old name. It may be, but we haven't polled for agreement on that; and, since the existing name exists in several other widely circulated documents already, we should be engaging this as a rename and take it with suitable aplomb.
  • We have a lot of very similar concepts, approached with different granularity of definition, in issue Identifying the critical decisions in IPLD advanced data structure design #130. Could we write a better document by starting again and selecting a hybrid of the best parts from that issue and this document?
  • ... and several other comments raised inline.

Proposal: let's move this file to the ./design-history/exploration-reports folder, date it, and call it lessons learned -- I like to see things land too, and I'd be more than happy to see it merge there, as it more accurately represents the state of play.

@rvagg
Copy link
Member

rvagg commented Jul 10, 2019

If we're going with the design-history thing then I agree that this might be better there (I'm still not convinced about design-history but it's a thing for now). The main hint in here is the digression into _type which we seem to be agreeing is just a placeholder for some superior mechanism yet defined. So it's more of a just-make-it-work-for-now description than a spec.

@mikeal
Copy link
Contributor Author

mikeal commented Jul 10, 2019

Proposal: let's move this file to the ./design-history/exploration-reports folder, date it, and call it lessons learned -- I like to see things land too, and I'd be more than happy to see it merge there, as it more accurately represents the state of play.

The entire purpose of having an “Exploratory” stage is to avoid having a bunch of exploratory documents in notes or “design history.”

The goal of this document is to write out and align effort going into Composites, as it will soon include at last 3 people on the team. Having people aligned on terminology and direction is the primary purpose of the document, as is the purpose of an “Exploratory” stage.

A document being in an exploratory stages does not solidify any of the approach, it’s all still subject to change or even to be discarded entirely. But, while people are actively trying to make forward progress, we need a way to write down and align that work, which is what the document is attempting to do. You may not agree with where all of the discussions ended up, and we may still return to them later, but in the interest of making forward progress we need to “disagree and commit” for the purposes of continuing to be able to do more exploratory development.

So it's more of a just-make-it-work-for-now description than a spec.

This is accurate, and should be what we assume the state of any Exploratory specification is.

We need to stop having PR’s open indefinitely because we lack 100% alignment on topics we have yet to even fully implement. We can continue to have discussions and make changes to Exploratory specifications, in fact, that’s one of the reason why we have a staging system at all.

@warpfork
Copy link
Contributor

Regarding the describing this is "spec-track": even if labeled 'exploratory', it is taking up a slot in the file tree that makes it hard to propose anything else in parallel. I think whether or not something takes up a 'slot' in such a way is the crux of the matter in communication and development flow in practice, and that's why I describe this as 'spec-track'.

I think we may actually want to update the governance doc to suggest that exploratory docs simply go in a different directory (as we've started doing already), and we don't use the main directories until things are at least at the 'draft' stage.

@mikeal
Copy link
Contributor Author

mikeal commented Jul 10, 2019

I think we may actually want to update the governance doc to suggest that exploratory docs simply go in a different directory (as we've started doing already), and we don't use the main directories until things are at least at the 'draft' stage.

+1000, I’ll work this into my next spec change.

@mikeal mikeal merged commit 1ebfe8b into master Jul 16, 2019
@rvagg rvagg deleted the generics branch July 17, 2019 04:48
@rvagg
Copy link
Member

rvagg commented Jul 17, 2019

This was merged with the file named 'generics.md', the title "Composites" and an ongoing discussion about whether even that's the right name. That's strong proof to me that this belongs in design/ history/ or whatever that directory is going to be.

@mikeal
Copy link
Contributor Author

mikeal commented Jul 17, 2019 via email

prataprc pushed a commit to iprs-dev/ipld-specs that referenced this pull request Oct 13, 2020
…ock types)) (ipld#126)

* wip: first go at a general spec for generics

* fix: indents and other improvements

* fixed indentation settings in iaWriter :)
* added some language agnostic notes on implementations

* fix: describe "leaf" and requirements on ops

* fix: numerous format fixes

* fix: better sentence from @vmx

* fix: numerous fixes and edits

* fix: code formatting error

* fix: more words about how definitions apply

* fix: less definitive language about CID extension
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants