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

codec: pathed link #352

@mikeal

Description

@mikeal

Wanted to open up a discussion about this particular idea.

We’ve had conversations for a while about how to represent a link as a (CID + Path) but haven’t agreed on anything stable yet.

One thought I had was to create a codec and simple block format for pathed links.

| multicodec | multihash | utf8(path) |
type PathedLink struct {
  link Link
  path String
} representation map

You could use the identity multicodec to inline the relevant data into a single CID and end up with a “pathed link.” Of course, the data model representation would not automatically traverse unless configured to do so but that’s ok, we need the data model to remain stable anyway. This would give us a link level indicator of how to traverse and we could instrument whatever special traversal logic we might need when and where we need it and are ready for it.

We also get a very compact representation since we’re able to shave some bytes in the block format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions