-
Notifications
You must be signed in to change notification settings - Fork 16
/
architecture.dot
281 lines (260 loc) · 10.8 KB
/
architecture.dot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
digraph G {
label="Decentraland"
labelloc="t"
fontsize =30
fontname="Helvetica,Arial,sans-serif"
compound=true;
node [fontname="Helvetica,Arial,sans-serif"]
edge [fontname="Helvetica,Arial,sans-serif"]
graph [
newrank = true,
nodesep = .5,
ranksep = .4,
splines = true,
]
node [
fixedsize = false,
fontsize =21,
height = 1,
shape = box,
colorscheme="pubugn9"
style = "filled,setlinewidth(2)",
fillcolor=1
width = 2
]
subgraph cluster_catalyst {
label = <Catalyst <BR/> <FONT POINT-SIZE="15">Decentralized Servers</FONT>>
colorscheme="pubugn9"
bgcolor=4
fontsize=24.0
URL="https://github.com/decentraland/catalyst"
BFF [
label=<BFF<BR /> <FONT POINT-SIZE="10">P2P Signaling and <br/>Client entry point</FONT>>
URL="https://github.com/decentraland/explorer-bff"
]
edge [
style = "invis"
]
Nginx [
label=<Nginx<BR/> <FONT POINT-SIZE="10">Reverse Proxy</FONT>>
]
Archipelago [
label=<Archipelago<BR/> <FONT POINT-SIZE="10">Groups peers in islands</FONT>>
URL="https://github.com/decentraland/archipelago-service"
]
NATS [
label=<NATS<BR/> <FONT POINT-SIZE="10">Message Broker</FONT>>
URL="https://nats.io/"
]
BFF -> Lambdas -> Archipelago -> Content
edge [
style = "normal"
dir=both
]
Content -> Nginx [constraint=false]
Content [
label=<Content Server<BR/> <FONT POINT-SIZE="10">Assets Storage</FONT>>
URL="https://github.com/decentraland/catalyst/tree/main/content"
]
Lambdas:e -> Nginx [constraint=false]
Lambdas [
label=<Lambdas<BR/> <FONT POINT-SIZE="10">Utilities to retrieve and validate data</FONT>>
URL="https://github.com/decentraland/catalyst/tree/main/lambdas"
]
BFF -> Nginx [constraint=false]
BFF -> NATS[constraint=false]
Archipelago -> NATS[constraint=false]
edge [
style = "invis"
]
Nginx -> NATS
}
LiveKit [
label=<LiveKit<BR/> <FONT POINT-SIZE="10">High Quality Media Server</FONT>>
URL="https://livekit.io/"
]
NATS:e -> LiveKit [ltail=cluster_catalyst]
edge [style = "normal"]
TheGraph [
label=<The Graph<BR/> <FONT POINT-SIZE="10">Query the Blockchain</FONT>>
URL="https://thegraph.com/hosted-service/subgraph/decentraland/collections-matic-mainnet"
]
Content:w -> TheGraph [ltail=cluster_catalyst]
edge [dir=both]
Nginx -> CatalystClient
subgraph cluster_cli {
label = <CLI<BR/><FONT POINT-SIZE="10"><BR/>Command line to start new projects,<BR/>preview changes and deploy<BR/>scenes and smart items</FONT>>
colorscheme="pubugn9"
bgcolor=4
fontsize=24.0
edge [ arrowhead=none, dir=none ]
CLI[
label=<CLI<BR/> <FONT POINT-SIZE="10"><BR/>Compiles scenes (build-ecs)<BR/>Preview scenes in browser<BR/>Uploads compiled code to catalys</FONT>>
URL="https://github.com/decentraland/cli"
]
"build-ecs" [
label=<build-ecs<FONT POINT-SIZE="10"><BR/>Bundles code from senes, AMD and ECS<BR/>to generate deployable scenes</FONT>>
URL="https://github.com/decentraland/js-sdk-toolchain/blob/c648dcabc0ac1aade3cf143769f7e7f67ffba95b/packages/%40dcl/build-ecs/index.ts"
]
CLI -> "build-ecs"
}
edge[arrowhead=none, dir=none style=invis]
Content -> CLI [ltail=cluster_catalyst, lhead=cluster_cli]
CatalystClient[
label=<Catalyst Client<BR/> <FONT POINT-SIZE="10">Library to interact with Catalyst Servers</FONT>>
URL="https://github.com/decentraland/catalyst-client"
]
edge[style=normal arrowhead=normal]
CLI -> CatalystClient
edge[style=normal arrowhead=normal dir=both]
Synapse[
label=<Synapse Matrix Server<BR/> <FONT POINT-SIZE="10">Decentralized Service to manages<BR/>private chats and Friendships</FONT>>
URL="https://github.com/decentraland/catalyst-client"
]
Synapse -> MatrixClient
subgraph cluster_webbrowser {
fontsize=24.0
colorscheme="pubugn9"
bgcolor=4
VoiceCodecWorker [
label=<Voice Codec Worker<FONT POINT-SIZE="10"><BR/><BR/>Encodes/decodes audio using libopus (wasm)</FONT>>
]
subgraph cluster_sceneruntime {
label="Scene Runtime (Web Worker)"
bgcolor=5
SceneRuntime
subgraph cluster_bundle {
bgcolor=6
label = "Scene Compiled Bundle"
edge [style=invis]
AMD[
label=<AMD<FONT POINT-SIZE="10"><BR/>Manages loading of RPC modules to interact<BR/>with different components of Decentraland</FONT>>
URL="https://github.com/decentraland/js-sdk-toolchain/tree/c648dcabc0ac1aade3cf143769f7e7f67ffba95b/packages/%40dcl/amd"
]
ECS [
label=<ECS<FONT POINT-SIZE="10"><BR/>The public library to interact with Decentraland.<BR/>Sometimes people refers to the ECS as “The SDK”</FONT>>
URL="https://github.com/decentraland/explorer/tree/f4c30a3cab1ef014e1f20efdb2a0a12ef6c996e0/kernel/packages/decentraland-ecs"
]
UserCode [
label=<User Code<FONT POINT-SIZE="10"><BR/>User generated code is part of the bundle<BR/> of the Scenes</FONT>>
]
AMD -> ECS -> UserCode
}
}
subgraph cluster_website {
label="Web App"
bgcolor=5
ExplorerWebSite
}
ClientComms[
label=<Client Comms<FONT POINT-SIZE="10"><BR/><BR/>Abstraction over the communications protocols</FONT>>
URL="https://github.com/decentraland/explorer/tree/df1d30412dcd1a94d933171a39796837aedc87a1/kernel/packages/shared/comms"
]
EthProvider[
label="Ethereum Provider"
]
ExplorerWebSite[
label=<Explorer Website<FONT POINT-SIZE="10"><BR/><BR/>React App to load kernel and renderer</FONT>>
URL="https://github.com/decentraland/explorer/tree/df1d30412dcd1a94d933171a39796837aedc87a1/kernel/packages/shared/comms"
]
ExplorerWebSite -> EthProvider
ClientComms -> ExplorerWebSite
subgraph cluster_Kernel {
label=<Kernel<FONT POINT-SIZE="10"><BR/><BR/>Code package to bind all low level constructs<BR/> of Decentraland to generate an<BR/> usable Explorer Arrows are omitted for clarity.<BR/> Assume everything is connected to Sagas.</FONT>>
URL="https://github.com/decentraland/kernel"
bgcolor=5
node [shape=ellipse]
Sagas
node [shape=box]
edge [style=invis]
ClientComms -> VoiceChat -> SceneLoader -> Scene -> AvatarScene -> MatrixClient -> Sagas
edge [style=solid arrowhead=normal dir=forward]
SceneLoader -> Scene
}
edge [style=normal]
CatalystPeer[
label=<Peer Library<BR/> <FONT POINT-SIZE="10">Comms Library</FONT>>
URL="https://github.com/decentraland/catalyst-comms-peer"
]
Renderer[
label=<Renderer<BR/> <FONT POINT-SIZE="10">Different implementations of renderers are available<BR/>to debug in Unity Editor</FONT>>
URL="https://github.com/decentraland/unity-renderer/"
]
VoiceChat[
label=<Voice Chat Module<BR/> <FONT POINT-SIZE="10">Set of components to hook<BR/>WebAudio and Worklets to comms</FONT>>
URL="https://github.com/decentraland/explorer/tree/af59463dd3882516874c86bc926726bc557d5184/kernel/packages/voice-chat-codec"
]
SceneLoader [
label=<Scene Loader System<BR/> <FONT POINT-SIZE="10">High level wrapper around a runtime scene</FONT>>
URL="https://github.com/decentraland/explorer/tree/df1d30412dcd1a94d933171a39796837aedc87a1/kernel/packages/decentraland-loader"
]
Scene [
label=<Scene<BR/> <FONT POINT-SIZE="10">Loads and Unloads scenes around the User</FONT>>
URL="https://github.com/decentraland/explorer/blob/af59463dd3882516874c86bc926726bc557d5184/kernel/packages/unity-interface/UnityScene.ts#L19"
]
AvatarScene [
label=<Avatar Scene<BR/> <FONT POINT-SIZE="10">It is a regular Decentraland Scene,.<BR/>it has the size of the world.<BR/> And it renders the avatars using the SDK</FONT>>
URL="https://github.com/decentraland/explorer/blob/af59463dd3882516874c86bc926726bc557d5184/kernel/packages/ui/avatar/avatarSystem.ts"
]
MatrixClient [
label=<Matrix Client<BR/> <FONT POINT-SIZE="10">Abstraction over the Matrix protocol to<BR/> enable Friends list and private chats</FONT>>
URL="https://github.com/decentraland/matrix-client"
]
Sagas [
label=<Sagas<BR/> <FONT POINT-SIZE="10">Like an ESB: Everything is connected to sagas</FONT>>
]
SceneRuntime[
label=<Scene Runtime<BR/> <FONT POINT-SIZE="10">Handles SDK bindings<br/>and messaging with the Scene in Kernel</FONT>>
URL="https://github.com/decentraland/matrix-client"
]
CatalystPeer -> ClientComms
VoiceChat -> VoiceCodecWorker
Renderer -> Scene
Renderer -> AvatarScene
Content -> Renderer
Scene -> SceneRuntime -> ECS
Content:e -> SceneRuntime
edge [style=invis]
"CatalystPeer" -> Renderer
label="Web Browser"
}
CatalystPeer -> Nginx
edge [style=rounded arrowhead=none dir=none lhead=cluster_bundle ]
"build-ecs":e -> ECS:e
{
rank = same;
Comms
Nginx
CatalystPeer
ExplorerWebSite
}
{
rank = same;
CLI
CatalystClient
}
{
rank=same;
MatrixClient
Synapse
}
{
rank = same;
CatalystPeer
ClientComms
}
{
rank = same;
Content
Renderer
Scene
SceneRuntime
ECS
}
{
rank=same;
Lambdas
VoiceChat
VoiceCodecWorker
}
}