add predefined nodes diagram

This commit is contained in:
LordGhostX 2023-06-10 01:29:29 +01:00
parent d7e12d6abb
commit a5e761b3af
No known key found for this signature in database
GPG Key ID: 520CC5DC4F94FCC7
8 changed files with 37 additions and 22 deletions

View File

@ -0,0 +1,7 @@
```mermaid
sequenceDiagram
Alice->>Bob: Connect to Bob (predefined node details)
Alice->>Carol: Connect to Carol (predefined node details)
```
Alice establishes connections with Bob and Carol using their node details, which are predefined (hard-coded) into Alice's node.

View File

@ -1,23 +1,23 @@
```mermaid
sequenceDiagram
participant A as A relay
participant B as B relay(pubtopic1)
participant C as C relay(pubtopic1)
participant D as D relay(pubtopic1), store(pubtopic1), filter
participant E as E relay, store
participant F as F filter
participant A as A relay
participant B as B relay(pubtopic1)
participant C as C relay(pubtopic1)
participant D as D relay(pubtopic1), store(pubtopic1), filter
participant E as E relay, store
participant F as F filter
A ->> A: msg1=WakuMessage(contentTopic1, data) (1)
F ->> D: FilterRequest(pubtopic1, contentTopic1) (2)
D ->> D: Subscribe F to filter (2)
A ->> B: Publish msg1 on pubtopic1 (3)
B ->> D: relay msg1 on pubtopic1 (3)
D ->> D: store: saves msg1 (4)
D ->> C: relay msg1 on pubtopic1 (4)
D ->> F: MessagePush(msg1) (5)
E ->> E: E comes online (6)
E ->> D: HistoryQuery(pubtopic1, contentTopic1) (6)
D ->> E: HistoryResponse(msg1, ...) (6)
A ->> A: msg1=WakuMessage(contentTopic1, data) (1)
F ->> D: FilterRequest(pubtopic1, contentTopic1) (2)
D ->> D: Subscribe F to filter (2)
A ->> B: Publish msg1 on pubtopic1 (3)
B ->> D: relay msg1 on pubtopic1 (3)
D ->> D: store: saves msg1 (4)
D ->> C: relay msg1 on pubtopic1 (4)
D ->> F: MessagePush(msg1) (5)
E ->> E: E comes online (6)
E ->> D: HistoryQuery(pubtopic1, contentTopic1) (6)
D ->> E: HistoryResponse(msg1, ...) (6)
```
The Pub/Sub topic `pubtopic1` serves as a means of routing messages (the network employs a default Pub/Sub topic) and indicates that it is subscribed to messages on that topic for a relay. Node D serves as a `Store` and is responsible for persisting messages.

View File

@ -27,7 +27,7 @@ Waku provides a set of protocols to optimize its performance in resource-limited
Here is a diagram illustrating the interaction between different protocols within the Waku Network.
```mdx-code-block
import ProtocolInteraction from "@site/diagrams/_protocol_interaction.md";
import ProtocolInteraction from "@site/diagrams/_protocol-interaction.md";
<ProtocolInteraction />
```

View File

@ -20,7 +20,7 @@ This bootstrapping method allows anyone to register and publish a domain name fo
## Overview
```mdx-code-block
import DNSDiscovery from "@site/diagrams/_dns_discovery.md";
import DNSDiscovery from "@site/diagrams/_dns-discovery.md";
<DNSDiscovery />
```

View File

@ -17,7 +17,7 @@ The primary objective of this protocol is to facilitate peer connectivity for re
## Overview
```mdx-code-block
import PeerExchange from "@site/diagrams/_peer_exchange.md";
import PeerExchange from "@site/diagrams/_peer-exchange.md";
<PeerExchange />
```

View File

@ -2,7 +2,7 @@
title: Predefined Nodes
---
Waku applications have the flexibility to embed bootstrap node addresses directly into their codebase. Developers can opt to use either the [predefined nodes by Status](https://github.com/waku-org/js-waku/blob/master/packages/core/src/lib/predefined_bootstrap_nodes.ts#L45) or [run a node](/guides/nodes-and-sdks#run-a-waku-node) per their preference.
Waku applications have the flexibility to embed bootstrap node addresses directly into their codebase. Developers can use either the [predefined nodes by Status](https://github.com/waku-org/js-waku/blob/master/packages/core/src/lib/predefined_bootstrap_nodes.ts#L45) or [run a node](/guides/nodes-and-sdks#run-a-waku-node) per their preference.
## Pros
@ -13,4 +13,12 @@ Waku applications have the flexibility to embed bootstrap node addresses directl
- Vulnerable to censorship: Node IPs can be blocked or restricted.
- Limited scalability: The number of nodes is fixed and cannot easily be expanded.
- Maintenance challenges: Updating the node list requires modifying the code, which can be cumbersome and involves releasing and deploying.
- Maintenance challenges: Updating the node list requires modifying the code, which can be cumbersome and involves releasing and deploying.
## Overview
```mdx-code-block
import PredefinedNodes from "@site/diagrams/_predefined-nodes.md";
<PredefinedNodes />
```