当前位置: 首页 > 工具软件 > mermaid > 使用案例 >

mermaid之subgraph的使用

松桐
2023-12-01

https://raw.githubusercontent.com/ipfs/ipfs-docs/main/docs/concepts/ipns.md

mermaid之subgraph的使用

第一步:我们把组件画好

graph TB
    Record>"IPNS Record"]
    subgraph Routing
      Publisher
      Resolver
      Local[("Local store")]
      subgraph Transports
        PubSub[(PubSub)]
        DHT[(DHT)]
      end
    end
Routing
Transports
Publisher
Resolver
Local store
PubSub
DHT
IPNS Record

第二步:我们添加组件之间的流程(关系)

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
Routing
Transports
resolve
(re)publish
PUT
GET
PUT
GET
Cache
GET
Cache
Publisher
Resolver
Local store
PubSub
DHT
IPNS Record
 类似资料: