Skip to content

Commit

Permalink
Merge pull request #1282 from ipfs/feat/add-mermaid-diagrams
Browse files Browse the repository at this point in the history
feat: add mermaid diagram support
  • Loading branch information
lidel committed Sep 19, 2022
2 parents 4183850 + ab84307 commit b8cd714
Show file tree
Hide file tree
Showing 4 changed files with 1,597 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/.vuepress/config.js
Expand Up @@ -442,6 +442,7 @@ module.exports = {
],
'vuepress-plugin-chunkload-redirect',
'vuepress-plugin-ipfs',
'vuepress-plugin-mermaidjs',
'tabs'
],
extraWatchFiles: ['.vuepress/nav/en.js']
Expand Down
24 changes: 24 additions & 0 deletions docs/concepts/ipns.md
Expand Up @@ -52,6 +52,12 @@ IPNS record can point at an immutable or a mutable path. The meaning behind CID

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

```mermaid
graph LR;
IPNS-- mutable pointer -->IPFS;
IPFS-- immutable pointer -->content;
```

```
IPFS = immutable *Pointer => content
IPNS = **Pointer => content
Expand Down Expand Up @@ -79,6 +85,24 @@ As a user or developer using IPNS for naming, there are three common operations

### IPNS is transport agnostic

```mermaid
graph TB
Record>"IPNS Record"]
subgraph Routing
Publisher
Resolver
Local[("Local store")]
subgraph Transports
PubSub[(PubSub)]
DHT[(DHT)]
end
end
Resolver-- resolve -->Record-- "(re)publish" -->Publisher
Publisher-- PUT -->DHT-. GET .->Resolver
Publisher-- PUT -->PubSub-. GET .->Resolver
Publisher-- Cache -->Local-. GET .->Resolver-- Cache -->Local
```

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.

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

0 comments on commit b8cd714

Please sign in to comment.