Skip to content

Fresh perspective from learning IPFS #145

Open
@JustinDrake

Description

@JustinDrake

I just spent about two weeks intensely studying IPFS (and learning Go) for an OpenBazaar project. (Ping me if you'd like to talk about OpenBazaar.) Going in I had some knowledge of cryptography, networking and decentralised networks. I think I wrapped my head around the "mountain of abstraction". I was prompted by @diasdavid to share some thoughts. Hopefully they will help some.

  • Having a concrete project in mind (https://github.com/OpenBazaar/openbazaar-go) motivated me and helped me learn.
  • As far as I can tell IPFS development is centralised around GitHub (a bit ironic? :) ). The most relevant GitHub accounts are @ipfs, @libp2p, @ipld and @multiformats.
  • There's a deluge of repos, but don't be too intimidated. Most of the repos are small and really focused. I ended embracing the modular approach as it's very much in line with the overall philosophy of being protocol-driven and agnostic of implementation for everything.
  • My goal was to build a strong understanding from the foundations up. The place to start for this is libp2p. Be ready to take in a lot of networking knowledge.
  • The libp2p specs are a good starting point, but you have to dig into the code or discussions if you want meat.
  • A good first-pass filter for repos is GitHub's language filter. There are "only" 34 repos in Go within libp2p.
  • gx deps --tree is your friend. Understand how the various modules fit together is critical. The dependency tree is a great starting point. The --highlight= option is especially useful on large repos such as go-ipfs or go-libp2p.
  • A good exercise is to try to separate out the repos by type (some are interface specifications, some are interface implementations, some are stubs).
  • It's not all that clear which repos are actually used in production, and which are in development or not activated. For example, there are 5 transport implementations for go-ipfs, but as far I as can tell only go-tcp-transport is used in production. Things like the relay protocol or super node routing are in the codebase but not in use. A document summarising the development status of every component would help.
  • It wasn't immediately obvious to me that the js-ipfs and go-ipfs are currently disjoint networks because there is no common transport layer and the relay protocol is not yet ready.
  • There are various examples scattered around. I wish I knew about them earlier as they made my life easier. See for example the echo example, hosting a website or this js-libp2p benchmark.
  • There's an open IPFS FAQ. It's a bit unconventional being built around permanently-open GitHub issues. I've asked 10 questions and got a reply for about half.
  • For questions there's also the IRC channel #ipfs. I'm not very comfortable with IRC, but I did get some useful responses out of it. My hit rate was similar to the FAQ (about 50%). My plea to the IPFS team is to move to the 21st century and embrace Slack. 👍
  • On IRC there are 5 "operators" (David Dias @diasdavid, Juan Benet @jbenet, Jakub Sztandera @Kubuxu, Lars Gierth @lgierth, Jeromy Johnson @whyrusleeping). I think these five guys do most of the heavy lifting and I look forward to get to know them better.
  • The ipfs/notes repo is a treasure trove. Some of the notes I enjoyed include packet switching, pubsub, Signal protocol, petnames, Tor, I2P and chunking.
  • The meaty bits are not where you expect. You have to work a bit to find them. The websites ipfs.io, libp2p.io and ipld.io are not yet loaded with docs. Most of the discussions happen in GitHub issues and pull-requests. I found discussion on IPFS paths quite fascinating.
  • The IPFS project is moving extremely fast so it's good to bathe yourself in context. The roadmaps (e.g. js-ipfs, libp2p, go-libp2p) help, but I wish there was something even better.
  • go-ipfs has a lot of code centred around the IPFS daemon. I think the daemon code should be segregated out into a new repository go-ipfs-daemon, with go-ipfs being as thin and clean as possible for others to reuse.
  • A bunch of introductory talks by Juan on YouTube were useful. This talk by David was also useful.
  • I found the "multi" nomenclature in multiformat confusing. For example, I initially assumed that a "multihash" was multiple hashes packed in one object. Replace "multi" in your mind with self-described.
  • A lot of the development is guided by academic research in decentralised systems/protocols, which is cool. For example, I think this paper inspired the secio handshake.
  • Learning about IPFS was a bit like delving into a new mini branch of mathematics, or a technology like Bitcoin. There are layers of abstraction with the main learning bottleneck being communication of concepts sometimes better explained by a human with diagrams and hand-waving. But once you get your ahead round the concepts, you realise they are actually quite natural and simple.

Onwards!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions