Skip to content

Latest commit

 

History

History
180 lines (115 loc) · 9.11 KB

dcl-architecture.md

File metadata and controls

180 lines (115 loc) · 9.11 KB
title slug
Platform
/contributor/architecture/platform

The following is a representation of the Decentraland Platform architecture and it's components:

architecture

Index

Catalyst

A Catalyst is a server that bundles different services. These services currently work as the backbone for Decentraland and run the decentralized storage for most of the content needed by the client and orchestrate the communications between peers. Some of these projects that are part of this bundle are:

If you just want to run a Catalyst server, please check the Catalyst Owner repository. You can check the list of available servers used by Decentraland in the Catalyst Monitor

Backend for Frontend (BFF)

This service was created to resolve client needs to enable faster development of new features without breaking the existing APIs. In the Catalyst context, it's used for the communications between peers connected to the client, its main responsibility is to manage the P2P signaling.

Repo link

Archipelago Service

Previously Archipelago was a library used by the Lighthouse, as now it needs to work with the different transports beyond P2P, it was converted into a Service. This service will have the same responsibility that the library did: group peers in clusters so they can communicate efficiently. On the other hand, the service will also need to be able to balance islands using the available transports and following a set of Catalyst Owner defined rules, in order to, for example, use LiveKit for an island in the Casino and P2P in a Plaza.

Repo link

NATS

NATS is a message broker that enables the data exchange and communication between services. This is also a building block for future developments and will enable an easy way to connect services using subject-based messaging. In the context of the communication services architecture, it is used to communicate the BFF, Archipelago and LiveKit.

Project link

LiveKit

LiveKit is an open source project that provides scalable, multi-user conferencing over WebRTC. Instead of doing a P2P network, peers are connected to a Selective Forwarding Unit (SFU) in charge of managing message relay and different quality aspects of the communication. This will be the added infrastructure in order to provide high-performance/high-quality communications between crowds on designated scenes.

Project link

Lambdas

This service provides a set of utilities required by the Catalyst Server Clients/Consumers in order to retrieve or validate data. Some of the validations run in these functions are ownership related and for that it uses The Graph to query the blockchain.

Content Server

The Content Server currently stores many of the Entities used in Decentraland. For example scenes, wearables and profiles. Content servers will automatically sync with each other, as long as they were all approved by the DAO.

If you set up a local content server, it will receive all updates by those other DAO Catalysts. However, new deployments that happen on your local server will not be sent to other servers.

Nginx

Nginx is the reverse proxy used to route traffic to the Catalysts Services.

CLI

This CLI provides tooling/commands to assist you in the scenes development process. Some of the commands will help you scaffold a new scene project, locally start and visualize the scene in order to test it and deploy it to a content server to be incorporated in your Decentraland parcel.

Repositories:

Catalyst Client

This client library can be used to interact with Decentraland's Catalyst servers. You can both fetch data, or deploy new entities to the server you specify.

Repositories:

Web Browser

Repositories:

Peer Library

The Peer Library manages Websocket connections for WebRTC signaling, Islands, Notifications and Location Data and WebRTC Connections for peers positions, scene bus, global chat and voice chat (private chat goes through the Matrix Synapse Server and the Matrix Client).

Repositories:

Kernel - Voice Chat Module

This Module is the codec to hook WebAudio & Worklets to comms

Kernel - Client Comms

Abstraction over the Communication Protocol

Kernel - Scene Loader System

Module that loads and unloads the scenes/parcels based on user position.

Kernel - Scene

High level wrapper around the runtime scene

Kernel - Avatar Scene

It is a regular Decentraland Scene, it has the size of the world. And it renders the avatars using the SDK

Matrix Client

The Matrix Client can be used to interact Decentraland's users, providing the ability to send private messages and add people as friends.

Sagas

Like an ESB. Everything is connected to Sagas

Synapse

Synapse server is an implementation of the Matrix Protocol, created for secure, decentralized communications. In the context of Decentraland it is used to manage private chats between peers and friendships.

Explorer Website

REACT Application to load Kernel and Renderer

Repositories:

Scene Runtime

Kernel - Runtime

The Runtime handles SDK bindings and messaging with the Scene in Kernel

Compiler Bundle

AMD

This Module manages loading of RPC modules to interact with different components of Decentraland

Repositories

ECS

The public library to interact with Decentraland. Sometimes people refers to the ECS as “The SDK”

User Code

The user generated code is part of the bundle of the Scenes