Metadata about IPLD links, particularly link importance

IPLD is fantastic for linking stored objects together, but it seems like there’s no way to assign metadata to those links that might be useful at the protocol level.

I’m thinking particularly of social network “feed” situation; I’d model a “profile” object, which would reference the hash of the head of my linked list of posts, and I’d also link to the other accounts I follow. Using CIDs for these links makes sense; I’m referring to other hashes in IPFS.

However, if I recursive pin such a profile, I’m going to retrieve the entire social network (or at least, the entire network of profiles connected to my own).

What would be convenient here would be to be able to use:

  • stanard IPLD links; CIDs that point to something that should be (recursive) retrieved with the current node
  • archival IPLD links; CIDs that should be retrieved with a lower priority, and only when archival retrival is what’s intended.

The same kind of approach would be very valuable for, say, Wikipedia articles (if modelled with IPLD, instead of just with HTML). I could specify to retrieve a given article, and up to depth=2 of archival links, knowing I’ll definitely get whole articles, and get relevant linked articles too.

This might be achievable by extending the DAG-CBOR spec to allow an additional Type 6 tag, say 170 (0xaa), so that:

  • Tag 42 means a CID link (which is what’s used today)
  • Tag 170 means an “archival CID link”, which would (initially) be ignored by old clients.

Is this something our community would find useful?

I still think about the usefulness of this (particularly as my mind is back on representing feeds in IPLD)

The two use CID link types seem particularly useful there:

  • The data linked with this CID is necessary for the complete use of the current node (preload is valuable; eg. images linked from an HTML page, or the content for a feed item)
  • The data linked with this CID is a useful reference, and could be helpfully retrieved in advance if conditions are suitable (eg storage apace/network speed).