Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Latest commit

 

History

History
36 lines (26 loc) · 1.5 KB

ARCHITECTURE.md

File metadata and controls

36 lines (26 loc) · 1.5 KB

IPFS Architecture

Table of Contents

Annotated version

What does this image explain?

  • IPFS uses ipfs-repo which picks fs or indexeddb as its storage drivers, depending if it is running in Node.js or in the Browser.
  • The exchange protocol, bitswap, uses the Block Service which in turn uses the Repo, offering a get and put of blocks to the IPFS implementation.
  • The DAG API (previously Object) comes from the IPLD Resolver, it can support several IPLD Formats (i.e: dag-pb, dag-cbor, etc).
  • The Files API uses ipfs-unixfs-engine to import and export files to and from IPFS.
  • libp2p, the network stack of IPFS, uses libp2p to dial and listen for connections, to use the DHT, for discovery mechanisms, and more.

Code Architecture and folder Structure

Source code

> tree src -L 2
src                 # Main source code folder
├── cli             # Implementation of the IPFS CLI
│   └── ...
├── http            # The HTTP-API implementation of IPFS as defined by HTTP API spec
├── core            # IPFS implementation, the core (what gets loaded in browser)
│   ├── components  # Each of IPFS subcomponent
│   └── ...
└── ...