mirror of
https://github.com/logos-messaging/docs.waku.org.git
synced 2026-01-03 21:33:05 +00:00
1 line
7.5 KiB
JavaScript
1 line
7.5 KiB
JavaScript
"use strict";(self.webpackChunkwaku_guide=self.webpackChunkwaku_guide||[]).push([[4550],{28453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>a});var n=s(96540);const o={},i=n.createContext(o);function r(e){const t=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),n.createElement(i.Provider,{value:t},e.children)}},70633:(e,t,s)=>{s.r(t),s.d(t,{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},"sidebar":"learn","previous":{"title":"Content Topics","permalink":"/learn/concepts/content-topics"},"next":{"title":"Transports","permalink":"/learn/concepts/transports"}}');var o=s(74848),i=s(28453);function r(e){const t={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)(t.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)(t.p,{children:["The Pub/Sub topic ",(0,o.jsx)(t.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)(t.code,{children:"Store"})," and is responsible for storing messages."]}),"\n",(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsxs)(t.li,{children:["Node A creates a WakuMessage ",(0,o.jsx)(t.code,{children:"msg1"})," with ",(0,o.jsx)(t.a,{href:"/learn/concepts/content-topics",children:"Content Topic"})," ",(0,o.jsx)(t.code,{children:"contentTopic1"}),"."]}),"\n",(0,o.jsxs)(t.li,{children:["Node F requests to get messages filtered by Pub/Sub topic ",(0,o.jsx)(t.code,{children:"pubtopic1"})," and Content Topic ",(0,o.jsx)(t.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)(t.li,{children:["Node A publishes ",(0,o.jsx)(t.code,{children:"msg1"})," on ",(0,o.jsx)(t.code,{children:"pubtopic1"}),". The message is sent from Node A to Node B and then forwarded to Node D."]}),"\n",(0,o.jsxs)(t.li,{children:["Node D, upon receiving ",(0,o.jsx)(t.code,{children:"msg1"}),", stores the message for future retrieval by other nodes and forwards it to Node C."]}),"\n",(0,o.jsxs)(t.li,{children:["Node D also pushes ",(0,o.jsx)(t.code,{children:"msg1"})," to Node F, informing it about the arrival of a new message."]}),"\n",(0,o.jsxs)(t.li,{children:["At a later time, Node E comes online and requests messages matching ",(0,o.jsx)(t.code,{children:"pubtopic1"})," and ",(0,o.jsx)(t.code,{children:"contentTopic1"})," from Node D. Node D responds with ",(0,o.jsx)(t.code,{children:"msg1"})," and potentially other messages that match the query."]}),"\n"]})]})}function a(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(r,{...e})}):r(e)}const c={title:"Network Domains",hide_table_of_contents:!0},l=void 0,d={},p=[{value:"Discovery domain",id:"discovery-domain",level:2},{value:"Gossip domain",id:"gossip-domain",level:2},{value:"Request/response domain",id:"requestresponse-domain",level:2},{value:"Overview of protocol interaction",id:"overview-of-protocol-interaction",level:2}];function h(e){const t={a:"a",h2:"h2",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"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."}),"\n",(0,o.jsx)(t.h2,{id:"discovery-domain",children:"Discovery domain"}),"\n",(0,o.jsxs)(t.p,{children:["Peer discovery in Waku facilitates locating other nodes within the network. As a modular protocol, Waku incorporates various discovery mechanisms, such as ",(0,o.jsx)(t.a,{href:"/learn/concepts/discv5",children:"Discv5"})," and ",(0,o.jsx)(t.a,{href:"/learn/concepts/peer-exchange",children:"Peer Exchange"}),". These mechanisms allow developers to choose the most suitable option(s) for their specific use cases and user environments, including mobile phones, desktop browsers, servers, and more."]}),"\n",(0,o.jsx)(t.h2,{id:"gossip-domain",children:"Gossip domain"}),"\n",(0,o.jsx)(t.p,{children:"GossipSub derives its name from the practice within Pub/Sub networks where peers gossip about the messages they have encountered, thus establishing a message delivery network."}),"\n",(0,o.jsxs)(t.p,{children:["Waku employs gossiping through ",(0,o.jsx)(t.a,{href:"/learn/concepts/protocols#relay",children:"Relay"})," to distribute messages across the network. Additionally, Waku introduces ",(0,o.jsx)(t.a,{href:"/learn/concepts/protocols#rln-relay",children:"RLN Relay"}),", an experimental mechanism that combines privacy preservation and economic spam protection."]}),"\n",(0,o.jsx)(t.h2,{id:"requestresponse-domain",children:"Request/response domain"}),"\n",(0,o.jsx)(t.p,{children:"Waku provides a set of protocols to optimise its performance in resource-limited environments like low bandwidth or mostly offline scenarios for multiple purposes."}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"/learn/concepts/protocols#store",children:"Store"})," enables the retrieval of historical messages."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"/learn/concepts/protocols#filter",children:"Filter"})," efficiently retrieves a subset of messages to conserve bandwidth."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"/learn/concepts/protocols#light-push",children:"Light Push"})," facilitates message publication for nodes with limited bandwidth and short connection windows."]}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"overview-of-protocol-interaction",children:"Overview of protocol interaction"}),"\n",(0,o.jsx)(t.p,{children:"Here is a diagram illustrating the interaction between different protocols within the Waku Network."}),"\n","\n",(0,o.jsx)(a,{})]})}function u(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}}}]); |