Skip to content

Commit b8cd714

Browse files
authored
Merge pull request #1282 from ipfs/feat/add-mermaid-diagrams
feat: add mermaid diagram support
2 parents 4183850 + ab84307 commit b8cd714

File tree

4 files changed

+1597
-0
lines changed

4 files changed

+1597
-0
lines changed

docs/.vuepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ module.exports = {
442442
],
443443
'vuepress-plugin-chunkload-redirect',
444444
'vuepress-plugin-ipfs',
445+
'vuepress-plugin-mermaidjs',
445446
'tabs'
446447
],
447448
extraWatchFiles: ['.vuepress/nav/en.js']

docs/concepts/ipns.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ IPNS record can point at an immutable or a mutable path. The meaning behind CID
5252

5353
The following is a useful mental model for understanding the difference between the two:
5454

55+
```mermaid
56+
graph LR;
57+
IPNS-- mutable pointer -->IPFS;
58+
IPFS-- immutable pointer -->content;
59+
```
60+
5561
```
5662
IPFS = immutable *Pointer => content
5763
IPNS = **Pointer => content
@@ -79,6 +85,24 @@ As a user or developer using IPNS for naming, there are three common operations
7985

8086
### IPNS is transport agnostic
8187

88+
```mermaid
89+
graph TB
90+
Record>"IPNS Record"]
91+
subgraph Routing
92+
Publisher
93+
Resolver
94+
Local[("Local store")]
95+
subgraph Transports
96+
PubSub[(PubSub)]
97+
DHT[(DHT)]
98+
end
99+
end
100+
Resolver-- resolve -->Record-- "(re)publish" -->Publisher
101+
Publisher-- PUT -->DHT-. GET .->Resolver
102+
Publisher-- PUT -->PubSub-. GET .->Resolver
103+
Publisher-- Cache -->Local-. GET .->Resolver-- Cache -->Local
104+
```
105+
82106
The self-certifying nature of IPNS records means that they are not tied to a specific transport protocol. In practice, most IPFS implementations rely on the [**DHT**](dht.md) and [**libp2p PubSub**](https://docs.libp2p.io/concepts/publish-subscribe/) to publish and resolve IPNS records.
83107

84108
There are nuanced differences and trade-offs between the **DHT** and **PubSub** to be aware of.

0 commit comments

Comments
 (0)