From a5e761b3af9cea8b217b124d8aba24f4ec896d2b Mon Sep 17 00:00:00 2001 From: LordGhostX Date: Sat, 10 Jun 2023 01:29:29 +0100 Subject: [PATCH] add predefined nodes diagram --- .../{_dns_discovery.md => _dns-discovery.md} | 0 .../{_peer_exchange.md => _peer-exchange.md} | 0 diagrams/_predefined-nodes.md | 7 ++++ ...nteraction.md => _protocol-interaction.md} | 34 +++++++++---------- docs/overview/concepts/network-domains.md | 2 +- .../concepts/peer-discovery/dns-discovery.md | 2 +- .../concepts/peer-discovery/peer-exchange.md | 2 +- .../peer-discovery/predefined-nodes.md | 12 +++++-- 8 files changed, 37 insertions(+), 22 deletions(-) rename diagrams/{_dns_discovery.md => _dns-discovery.md} (100%) rename diagrams/{_peer_exchange.md => _peer-exchange.md} (100%) create mode 100644 diagrams/_predefined-nodes.md rename diagrams/{_protocol_interaction.md => _protocol-interaction.md} (62%) diff --git a/diagrams/_dns_discovery.md b/diagrams/_dns-discovery.md similarity index 100% rename from diagrams/_dns_discovery.md rename to diagrams/_dns-discovery.md diff --git a/diagrams/_peer_exchange.md b/diagrams/_peer-exchange.md similarity index 100% rename from diagrams/_peer_exchange.md rename to diagrams/_peer-exchange.md diff --git a/diagrams/_predefined-nodes.md b/diagrams/_predefined-nodes.md new file mode 100644 index 0000000..7d1a0ec --- /dev/null +++ b/diagrams/_predefined-nodes.md @@ -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. \ No newline at end of file diff --git a/diagrams/_protocol_interaction.md b/diagrams/_protocol-interaction.md similarity index 62% rename from diagrams/_protocol_interaction.md rename to diagrams/_protocol-interaction.md index fbc7543..2e65615 100644 --- a/diagrams/_protocol_interaction.md +++ b/diagrams/_protocol-interaction.md @@ -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. diff --git a/docs/overview/concepts/network-domains.md b/docs/overview/concepts/network-domains.md index ed506ac..b806d3f 100644 --- a/docs/overview/concepts/network-domains.md +++ b/docs/overview/concepts/network-domains.md @@ -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"; ``` \ No newline at end of file diff --git a/docs/overview/concepts/peer-discovery/dns-discovery.md b/docs/overview/concepts/peer-discovery/dns-discovery.md index 16cb9d0..03a4a2a 100644 --- a/docs/overview/concepts/peer-discovery/dns-discovery.md +++ b/docs/overview/concepts/peer-discovery/dns-discovery.md @@ -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"; ``` \ No newline at end of file diff --git a/docs/overview/concepts/peer-discovery/peer-exchange.md b/docs/overview/concepts/peer-discovery/peer-exchange.md index cdd8782..9951f3c 100644 --- a/docs/overview/concepts/peer-discovery/peer-exchange.md +++ b/docs/overview/concepts/peer-discovery/peer-exchange.md @@ -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"; ``` \ No newline at end of file diff --git a/docs/overview/concepts/peer-discovery/predefined-nodes.md b/docs/overview/concepts/peer-discovery/predefined-nodes.md index eb4873e..040a987 100644 --- a/docs/overview/concepts/peer-discovery/predefined-nodes.md +++ b/docs/overview/concepts/peer-discovery/predefined-nodes.md @@ -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. \ No newline at end of file +- 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"; + + +``` \ No newline at end of file