mirror of
https://github.com/logos-messaging/docs.waku.org.git
synced 2026-01-03 21:33:05 +00:00
1 line
9.0 KiB
JavaScript
1 line
9.0 KiB
JavaScript
"use strict";(self.webpackChunkwaku_guide=self.webpackChunkwaku_guide||[]).push([[727],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=o.createContext({}),c=function(e){var t=o.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},p=function(e){var t=c(e.components);return o.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(n),m=r,f=u["".concat(l,".").concat(m)]||u[m]||d[m]||i;return n?o.createElement(f,a(a({ref:t},p),{},{components:n})):o.createElement(f,a({ref:t},p))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:r,a[1]=s;for(var c=2;c<i;c++)a[c]=n[c];return o.createElement.apply(null,a)}return o.createElement.apply(null,n)}m.displayName="MDXCreateElement"},12381:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>c,default:()=>h,frontMatter:()=>l,metadata:()=>p,toc:()=>d});var o=n(87462),r=(n(67294),n(3905));const i={toc:[]},a="wrapper";function s(e){let{components:t,...n}=e;return(0,r.kt)(a,(0,o.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("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)"}),(0,r.kt)("p",null,"The Pub/Sub topic ",(0,r.kt)("inlineCode",{parentName:"p"},"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,r.kt)("inlineCode",{parentName:"p"},"Store")," and is responsible for storing messages."),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Node A creates a WakuMessage ",(0,r.kt)("inlineCode",{parentName:"li"},"msg1")," with ",(0,r.kt)("a",{parentName:"li",href:"/learn/concepts/content-topics"},"Content Topic")," ",(0,r.kt)("inlineCode",{parentName:"li"},"contentTopic1"),"."),(0,r.kt)("li",{parentName:"ol"},"Node F requests to get messages filtered by Pub/Sub topic ",(0,r.kt)("inlineCode",{parentName:"li"},"pubtopic1")," and Content Topic ",(0,r.kt)("inlineCode",{parentName:"li"},"contentTopic1"),". Node D subscribes F to this filter and will forward messages that match that filter in the future."),(0,r.kt)("li",{parentName:"ol"},"Node A publishes ",(0,r.kt)("inlineCode",{parentName:"li"},"msg1")," on ",(0,r.kt)("inlineCode",{parentName:"li"},"pubtopic1"),". The message is sent from Node A to Node B and then forwarded to Node D."),(0,r.kt)("li",{parentName:"ol"},"Node D, upon receiving ",(0,r.kt)("inlineCode",{parentName:"li"},"msg1"),", stores the message for future retrieval by other nodes and forwards it to Node C."),(0,r.kt)("li",{parentName:"ol"},"Node D also pushes ",(0,r.kt)("inlineCode",{parentName:"li"},"msg1")," to Node F, informing it about the arrival of a new message."),(0,r.kt)("li",{parentName:"ol"},"At a later time, Node E comes online and requests messages matching ",(0,r.kt)("inlineCode",{parentName:"li"},"pubtopic1")," and ",(0,r.kt)("inlineCode",{parentName:"li"},"contentTopic1")," from Node D. Node D responds with ",(0,r.kt)("inlineCode",{parentName:"li"},"msg1")," and potentially other messages that match the query.")))}s.isMDXComponent=!0;const l={title:"Network Domains",hide_table_of_contents:!0},c=void 0,p={unversionedId:"learn/concepts/network-domains",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:!1,editUrl:"https://github.com/waku-org/docs.waku.org/tree/develop/docs/learn/concepts/network-domains.md",tags:[],version:"current",lastUpdatedAt:1700737292,formattedLastUpdatedAt:"23 Nov 2023",frontMatter:{title:"Network Domains",hide_table_of_contents:!0},sidebar:"learn",previous:{title:"Content Topics",permalink:"/learn/concepts/content-topics"},next:{title:"Transports",permalink:"/learn/concepts/transports"}},u={},d=[{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}],m={toc:d},f="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,o.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"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."),(0,r.kt)("h2",{id:"discovery-domain"},"Discovery domain"),(0,r.kt)("p",null,"Peer discovery in Waku facilitates locating other nodes within the network. As a modular protocol, Waku incorporates various discovery mechanisms, such as ",(0,r.kt)("a",{parentName:"p",href:"/learn/concepts/discv5"},"Discv5")," and ",(0,r.kt)("a",{parentName:"p",href:"/learn/concepts/peer-exchange"},"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."),(0,r.kt)("h2",{id:"gossip-domain"},"Gossip domain"),(0,r.kt)("p",null,"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."),(0,r.kt)("p",null,"Waku employs gossiping through ",(0,r.kt)("a",{parentName:"p",href:"/learn/concepts/protocols#relay"},"Relay")," to distribute messages across the network. Additionally, Waku introduces ",(0,r.kt)("a",{parentName:"p",href:"/learn/concepts/protocols#rln-relay"},"RLN Relay"),", an experimental mechanism that combines privacy preservation and economic spam protection."),(0,r.kt)("h2",{id:"requestresponse-domain"},"Request/response domain"),(0,r.kt)("p",null,"Waku provides a set of protocols to optimise its performance in resource-limited environments like low bandwidth or mostly offline scenarios for multiple purposes."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/learn/concepts/protocols#store"},"Store")," enables the retrieval of historical messages."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/learn/concepts/protocols#filter"},"Filter")," efficiently retrieves a subset of messages to conserve bandwidth."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/learn/concepts/protocols#light-push"},"Light Push")," facilitates message publication for nodes with limited bandwidth and short connection windows.")),(0,r.kt)("h2",{id:"overview-of-protocol-interaction"},"Overview of protocol interaction"),(0,r.kt)("p",null,"Here is a diagram illustrating the interaction between different protocols within the Waku Network."),(0,r.kt)(s,{mdxType:"ProtocolInteraction"}))}h.isMDXComponent=!0}}]); |