Giter VIP home page Giter VIP logo

ipld-examples's Introduction

This repository is no longer maintained, see https://ipld.io for the latest information on IPLD and its use.

IPLD Examples

This repo contains several datastructure examples to use with IPLD, the new data format for IPFS.

These examples aim to be complete.

Contents

Experiment

Pathing Semantics

How to structure pathing and resolution through objects is a troublesome issue. You can read the IPLD spec here and read some of the arguments here.

The problem boils down to an issue introduced by the combination of link-local properties (properties on the link object itself) and transparent resolution of objects and links (using a single delimiter for traversing objects and links).

To resolve this, a number of variations have been presented:

  • 1) transparent, no link properties access use only / but disallow accessing link-local properties. cons: cannot access link properties :(
  • 2) transparent, no link properties use only / but disallow using link-local properties. cons: cannot HAVE link properties :c
  • 3) transparent, hope for the best use only / and define the order the accesses happen, so that it is not ambiguous. cons: it may be confusing.
  • 4) different delimiters, strict - use different delimiters for "link local" and "link resolving" components (eg . / or / //). cons: two delimiters, escaping or incompatibilities
  • 5) different delimiters, permissive like (3) + (4), allow different delimiters to disambiguate "link local" and "link resolving" components
  • 6) .object and .link accessors use explicit .object to access the object resolved through, and/or .link for accessing link local properties.
  • 7) use explicit link/ to resolve through (or some other operator string/char) con: a/link/b/link/c/link typing.
  • 8) different delimiters, strict and explicit link/, a combination of (4) and (7).

One goal of this repo is to experiment with these and see which feels best.

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the IPFS Code of Conduct.

License

MIT

ipld-examples's People

Contributors

dignifiedquire avatar jbenet avatar parkan avatar richardlitt avatar rvagg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ipld-examples's Issues

Prefer cson over yaml?

CSON is a very nice superset of (well formatted) JSON, which notably allows for comments. I prefer it over yaml myself, so wanted to make sure you're aware of it @jbenet ... Ultimately just a color preference tho.

Possible ideas: JSON pointer style

I like the way JSON pointer was originally envisioned. The idea that one could navigate a json tree in the same way we navigate paths

{people: [{name: "Nicola"}, {name: "Juan"}]}

/people
>  [{name: "Nicola"}, {name: "Juan"}]}

/people/0
> {name: "Nicola"}

/people/0/name
> "Nicola"

I remember the original ipld notes alluded at this and I found this so interesting. The first three examples seem very similar to this. However, the only limitation is on how we would like to follow/resolve links..

{people: [{@mlink: "hash!?"}, ..]}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.