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

Commit 6f1381f

Browse files
authored
docs: add IPFS Architecture Diagram (#1673)
* docs: add IPFS Architecture Diagram * docs: apply review to arch diagram
1 parent d3345a5 commit 6f1381f

File tree

5 files changed

+72
-4
lines changed

5 files changed

+72
-4
lines changed

β€ŽREADME.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -995,17 +995,19 @@ the metrics (in prometheus format) by making a GET request to the following endp
995995
http://localhost:5002/debug/metrics/prometheus
996996
```
997997

998-
### IPFS Core Architecture
998+
### IPFS Architecture
999999

1000-
![](/img/core.png)
1000+
![](/img/architecture.png)
1001+
1002+
[Annotated version](https://user-images.githubusercontent.com/1211152/47606420-b6265780-da13-11e8-923b-b365a8534e0e.png)j
10011003

10021004
What does this image explain?
10031005

10041006
- 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.
10051007
- 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.
10061008
- The DAG API (previously Object) comes from the IPLD Resolver, it can support several IPLD Formats (i.e: dag-pb, dag-cbor, etc).
10071009
- The Files API uses `ipfs-unixfs-engine` to import and export files to and from IPFS.
1008-
- Swarm, the component that offers a network API, uses libp2p to dial and listen for connections, to use the DHT, for discovery mechanisms, and more. libp2p-ipfs-nodejs is used when running in Node.js and libp2p-ipfs-browser is used when running in the browser.
1010+
- libp2p, the network stack of IPFS, uses libp2p to dial and listen for connections, to use the DHT, for discovery mechanisms, and more.
10091011

10101012
## Contribute
10111013

β€Žexamples/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ Let us know if you find any issue or if you want to contribute and add a new tut
3232

3333
In this section, you will find explanations to different pieces of IPFS Architecture and how `js-ipfs` implements them.
3434

35-
![](../img/core.png)
35+
![](../img/architecture.png)
36+
37+
[Annotated version](https://user-images.githubusercontent.com/1211152/47606420-b6265780-da13-11e8-923b-b365a8534e0e.png)
3638

3739
> These explanations are still a work in progress
3840

β€Žimg/architecture.monopic

6.8 KB
Binary file not shown.

β€Žimg/architecture.png

140 KB
Loading

β€Žimg/architecture.txt

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
2+
β”‚ The IPFS Architecture β”‚
3+
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
4+
┏━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━
5+
======================= IPFS Daemon ======================= ┃
6+
┃ ┃
7+
β”ƒβ”Œβ”€β”€β”€β”€β” ┏ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━
8+
β”‚ β”‚ ++++++++++++++++++ IPFS Core ++++++++++++++++++ ┃
9+
β”‚ β”‚ ┃ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
10+
β”‚HTTPβ”‚ β”Œβ”€β”‚ API (Core API) β”‚ ┃┃
11+
┃│Gateβ”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€ ┃
12+
┃│way │◀─ β”‚ Repo β”‚Block β”‚ DAG β”‚ Pin β”‚Files β”‚ β”‚Networkβ”‚ ┃
13+
β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜
14+
β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ ┃
15+
β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”˜ β”‚ β”Œβ”€β”€β”€β”€β”˜ β”Œβ”€β”€β”€β”€β”˜ ┃
16+
β”ƒβ””β”€β”€β”€β”€β”˜ β”‚ β”Œβ”€β”€β”˜ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό ┃┃
17+
┃ β”‚ β”‚β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
18+
β”Œβ”€β”€β”€β”€β” β”‚ β”‚β”‚ β”‚β”Œβ”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”β”‚ libp2p │┃
19+
β”‚ β”‚ β”‚ β”‚β”‚ β”‚β”‚Pinningβ”‚β”‚Unixfsβ”‚β”‚ (Network, PubSub, β”‚
20+
β”‚ β”‚ β”‚ β”‚β”‚ β”‚β”‚Serviceβ”‚β”‚Engineβ”‚β”‚ Swarm, Crypto) │┃┃
21+
┃│ β”‚ β”‚ β”‚β”‚ β”‚β””β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”˜β”‚β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚ ┃
22+
┃│HTTPβ”‚ β”‚ β”‚β”‚ β”‚ β”‚ β”‚ β”‚β”‚Connection Manager││┃
23+
β”‚RPC β”‚ β”‚ β”‚β”‚ β”œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
24+
β”Œβ”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”‚API β”‚β—€β”˜ β”‚β”‚ β”‚ β”‚β”Œ ─ ─ ─ ─ ─ ─ ─ ─ ─ │┃
25+
β”‚CLIβ”‚β”‚ipfs-apiβ”‚ β”‚ β”‚ ┃ β”‚β”‚ β”‚ β”‚ Peer Reputation β”‚β”‚ ┃
26+
β””β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”ƒβ”‚ β”‚ β”‚β”‚ β”‚ β”‚β”” ─ ─ ─ ─ ─ ─ ─ ─ ─ │┃┃
27+
┃│ β”‚ ┃ β”‚β”‚ β”Œβ”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
28+
β”‚ β”‚ β”‚β”‚ β”‚ β”Œ ─ ─ ─ ─ β”β”Œ ─ ─ ─ ─ ─ ┃
29+
β””β”€β”€β”€β”€β”˜ ┃ β”‚β”‚ β”‚ Providers GC β”‚
30+
β”‚β”‚ β–Ό β”‚ Service β”‚β”‚ ┃┃
31+
┃ ┃ β”‚β”‚β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ β”˜ ┃
32+
┃ β”‚β”‚β”‚Graph Service│─────┬───────────┬───────────┐ ┃
33+
┃ β”‚β”‚β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β–Ό β–Ό β–Ό
34+
β”‚β”‚ β”‚ β”Œ ─ ─ ─ ─ ─ β”Œ ─ ─ ─ ─ ─ β”Œ ─ ─ ─ ─ ─ ┃
35+
┃ │└──────── GraphSync β”‚ GraphSyncBβ”‚ GraphSyncCβ”‚ ┃
36+
┃ β”‚ β–Ό β”” ─ ─ ─ ─ ─ β”” ─ ─ ─ ─ ─ β”” ─ ─ ─ ─ ─ ┃┃
37+
┃ ┃ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
38+
β”‚ β”‚Block Service│─────┬───────────┬───────────┐ ┃
39+
┃ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β–Ό β–Ό β–Ό
40+
β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œ ─ ─ ─ ─ ─ β”Œ ─ ─ ─ ─ ─ ┃┃
41+
┃ ┃ └─────┬──┴──────│ Bitswap β”‚ BitswapB β”‚ BitswapB β”‚ ┃
42+
┃ β–Ό β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”” ─ ─ ─ ─ ─ β”” ─ ─ ─ ─ ─ ┃
43+
┃ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
44+
β”‚ Repo β”‚ ┃
45+
┃ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ┃
46+
┃ β”‚ ┃┃
47+
┃ ┃ β”Œβ”€β”΄β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”
48+
β–Ό β–Ό β–Ό β–Ό ┃
49+
┃ β”Œβ”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”
50+
β”‚ fs β”‚β”‚indexedDB β”‚β”‚LevelDB β”‚β”‚ S3 β”‚ ┃┃
51+
┃ ┃ β””β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”˜ ┃
52+
┃ ┃
53+
β”— ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━
54+
━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━
55+
56+
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
57+
β”‚ Legend β”‚
58+
β”‚ β”Œ ─ ─ ┐ β”‚
59+
β”‚ Planned, not yet implemented β”‚
60+
β”‚ β”” ─ ─ β”˜ β”‚
61+
β”‚ β”Œβ”€β”€β”€β”€β”€β” β”‚
62+
β”‚ β”‚ β”‚ Exist and shipped with IPFS β”‚
63+
β”‚ β””β”€β”€β”€β”€β”€β”˜ β”‚
64+
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

0 commit comments

Comments
Β (0)