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

Commit ad8bac6

Browse files
committed
docs: apply review to arch diagram
1 parent a516d80 commit ad8bac6

File tree

5 files changed

+39
-25
lines changed

5 files changed

+39
-25
lines changed

README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -991,26 +991,28 @@ the metrics (in prometheus format) by making a GET request to the following endp
991991
http://localhost:5002/debug/metrics/prometheus
992992
```
993993

994-
### IPFS Core Architecture
994+
### IPFS Architecture
995995

996-
![](/img/core.png)
996+
![](/img/architecture.png)
997+
998+
[Annotated version](https://user-images.githubusercontent.com/1211152/47606420-b6265780-da13-11e8-923b-b365a8534e0e.png)j
997999

9981000
What does this image explain?
9991001

10001002
- 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.
10011003
- 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.
10021004
- The DAG API (previously Object) comes from the IPLD Resolver, it can support several IPLD Formats (i.e: dag-pb, dag-cbor, etc).
10031005
- The Files API uses `ipfs-unixfs-engine` to import and export files to and from IPFS.
1004-
- 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.
1006+
- libp2p, the network stack of IPFS, uses libp2p to dial and listen for connections, to use the DHT, for discovery mechanisms, and more.
10051007

10061008
## Contribute
10071009

10081010
IPFS implementation in JavaScript is a work in progress. As such, there's a few things you can do right now to help out:
10091011
1010-
* Go through the modules below and **check out existing issues**. This would be especially useful for modules in active development. Some knowledge of IPFS may be required, as well as the infrastructure behind it - for instance, you may need to read up on p2p and more complex operations like muxing to be able to help technically.
1011-
* **Perform code reviews**. More eyes will help (a) speed the project along, (b) ensure quality, and (c) reduce possible future bugs.
1012-
* Take a look at go-ipfs and some of the planning repositories or issues: for instance, the [libp2p spec](https://github.com/ipfs/specs/pull/19). Contributions here that would be most helpful are **top-level comments** about how it should look based on our understanding. Again, the more eyes the better.
1013-
* **Add tests**. There can never be enough tests.
1012+
- Go through the modules below and **check out existing issues**. This would be especially useful for modules in active development. Some knowledge of IPFS may be required, as well as the infrastructure behind it - for instance, you may need to read up on p2p and more complex operations like muxing to be able to help technically.
1013+
- **Perform code reviews**. More eyes will help (a) speed the project along, (b) ensure quality, and (c) reduce possible future bugs.
1014+
- Take a look at go-ipfs and some of the planning repositories or issues: for instance, the [libp2p spec](https://github.com/ipfs/specs/pull/19). Contributions here that would be most helpful are **top-level comments** about how it should look based on our understanding. Again, the more eyes the better.
1015+
- **Add tests**. There can never be enough tests.
10141016
10151017
### Want to hack on IPFS?
10161018

examples/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ Let us know if you find any issue or if you want to contribute and add a new tut
3131

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

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

3638
> These explanations are still a work in progress
3739

img/architecture.monopic

665 Bytes
Binary file not shown.

img/architecture.png

23.5 KB
Loading

img/architecture.txt

+27-17
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313
│ │ │ └──────┴──────┴──────┴──────┴──────┘ └───────┘
1414
│ │ │ │ │ │ │ │ │ ┃
1515
│ │ │ │ │ ┌────┘ │ ┌────┘ ┌────┘ ┃
16-
┃└────┘ │ ┌──┘ │ │ ┌──────┘ │ ┃┃
17-
┃ │ │┌────────┘ │ ▼ ▼
18-
┌────┐ │ ││ │┌───────┐┌──────┐┌────────────────────┐
19-
│ │ │ ││ ││Pinning││Unixfs││ libp2p
20-
│ │ │ ││ ││Service││Engine││┌──────────────────┐│┃┃
21-
┃│ │ │ ││ │└───────┘└──────┘││Connection Manager││ ┃
22-
┃│HTTP│ │ ││ │ │ │ │└──────────────────┘│┃
23-
│RPC │ │ ││ ├────┴────────┘ │┌ ─ ─ ─ ─ ─ ─ ─ ─ ─
24-
┌───┐┌────────┐ │API │◀┘ ││ │ │ Peer Reputation ││┃
25-
│CLI││ipfs-api│ │ │ ┃ ││ │ │└ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ ┃
26-
└───┘└────────┘┃│ │ ││ │ └────────────────────┘┃┃
27-
┃│ │ ┃ ││ ┌──┘┌ ─ ─ ─ ─ ┐┌ ─ ─ ─ ─ ─
28-
│ │ ││ │ Providers GC
29-
└────┘ ┃ ││ │ │ Service │
30-
││ ▼ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ ┃┃
31-
┃ ┃ ││┌─────────────┐
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+
┃ ┃ ││┌─────────────┐ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘
3232
┃ │││Graph Service│─────┬───────────┬───────────┐ ┃
3333
┃ ││└─────────────┘ ▼ ▼ ▼
3434
││ │ ┌ ─ ─ ─ ─ ─ ┌ ─ ─ ─ ─ ─ ┌ ─ ─ ─ ─ ─ ┃
@@ -51,4 +51,14 @@
5151
┃ ┃ └────┘└──────────┘└────────┘└────┘ ┃
5252
┃ ┃
5353
┗ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━
54-
━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━ ━━
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)