docs.waku.org/assets/js/b54b2767.e8b8089b.js

1 line
7.6 KiB
JavaScript
Raw Permalink Normal View History

2025-10-03 11:14:33 +00:00
"use strict";(self.webpackChunkwaku_guide=self.webpackChunkwaku_guide||[]).push([[4550],{28453:(e,s,t)=>{t.d(s,{R:()=>r,x:()=>a});var n=t(96540);const o={},i=n.createContext(o);function r(e){const s=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),n.createElement(i.Provider,{value:s},e.children)}},70633:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>d,contentTitle:()=>l,default:()=>u,frontMatter:()=>c,metadata:()=>n,toc:()=>p});const n=JSON.parse('{"id":"learn/concepts/network-domains","title":"Network Domains","description":"Waku is a unified and cohesive entity that offers a rich ecosystem with three distinct network interaction domains. These domains serve specialised purposes and contribute to the robust functionality of Waku, forming its foundation.","source":"@site/docs/learn/concepts/network-domains.md","sourceDirName":"learn/concepts","slug":"/learn/concepts/network-domains","permalink":"/learn/concepts/network-domains","draft":false,"unlisted":false,"editUrl":"https://github.com/waku-org/docs.waku.org/tree/develop/docs/learn/concepts/network-domains.md","tags":[],"version":"current","lastUpdatedAt":null,"frontMatter":{"title":"Network Domains","hide_table_of_contents":true,"displayed_sidebar":"learn"},"sidebar":"learn","previous":{"title":"Content Topics","permalink":"/learn/concepts/content-topics"},"next":{"title":"Transports","permalink":"/learn/concepts/transports"}}');var o=t(74848),i=t(28453);function r(e){const s={a:"a",code:"code",li:"li",mermaid:"mermaid",ol:"ol",p:"p",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.mermaid,{value:"sequenceDiagram\n\tparticipant A as A relay\n\tparticipant B as B relay(pubtopic1)\n\tparticipant C as C relay(pubtopic1)\n\tparticipant D as D relay(pubtopic1), store(pubtopic1), filter\n\tparticipant E as E relay, store\n\tparticipant F as F filter\n\n\tA ->> A: msg1=WakuMessage(contentTopic1, data) (1)\n\tF ->> D: FilterRequest(pubtopic1, contentTopic1) (2)\n\tD ->> D: Subscribe F to filter (2)\n\tA ->> B: Publish msg1 on pubtopic1 (3)\n\tB ->> D: relay msg1 on pubtopic1 (3)\n\tD ->> D: store: saves msg1 (4)\n\tD ->> C: relay msg1 on pubtopic1 (4)\n\tD ->> F: MessagePush(msg1) (5)\n\tE ->> E: E comes online (6)\n\tE ->> D: HistoryQuery(pubtopic1, contentTopic1) (6)\n\tD ->> E: HistoryResponse(msg1, ...) (6)"}),"\n",(0,o.jsxs)(s.p,{children:["The Pub/Sub topic ",(0,o.jsx)(s.code,{children:"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 ",(0,o.jsx)(s.code,{children:"Store"})," and is responsible for storing messages."]}),"\n",(0,o.jsxs)(s.ol,{children:["\n",(0,o.jsxs)(s.li,{children:["Node A creates a WakuMessage ",(0,o.jsx)(s.code,{children:"msg1"})," with ",(0,o.jsx)(s.a,{href:"/learn/concepts/content-topics",children:"Content Topic"})," ",(0,o.jsx)(s.code,{children:"contentTopic1"}),"."]}),"\n",(0,o.jsxs)(s.li,{children:["Node F requests to get messages filtered by Pub/Sub topic ",(0,o.jsx)(s.code,{children:"pubtopic1"})," and Content Topic ",(0,o.jsx)(s.code,{children:"contentTopic1"}),". Node D subscribes F to this filter and will forward messages that match that filter in the future."]}),"\n",(0,o.jsxs)(s.li,{children:["Node A publishes ",(0,o.jsx)(s.code,{children:"msg1"})," on ",(0,o.jsx)(s.code,{children:"pubtopic1"}),". The message is sent from Node A to Node B and then forwarded to Node D."]}),"\n",(0,o.jsxs)(s.li,{children:["Node D, upon receiving ",(0,o.jsx)(s.code,{children:"msg1"}),", stores the message for future retrieval by other nodes and forwards it to Node C."]}),"\n",(0,o.jsxs)(s.li,{children:["Node D also pushes ",(0,o.jsx)(s.code,{children:"msg1"})," to Node F, informing it about the arrival of a new message."]}),"\n",(0,o.jsxs)(s.li,{children:["At a later time, Node E comes online and requests messages matchin