> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/contributor/contributor-zh/tong-xin/main-realm.md).

# MAIN Realm

Decentraland 拥有的 realm 数量与提供通信服务的 Catalyst 数量相同，但有一个独特的 realm 叫作 MAIN，它存在于 Catalysts 网络之外。MAIN realm 是专门设计来简化用户连接流程的，使用户更容易进行互动和会面。它由一组服务构成，这些服务能够替代 Catalyst 节点的通信服务。该 realm 是用户登录 Decentraland 后的默认目的地。

该 [realm 提供者](https://github.com/decentraland/realm-provider) 服务暴露一个 [/about](https://realm-provider.decentraland.org/main/about) 带有 realm 描述的端点，依据 [ADR-110：Realm 描述](https://adr.decentraland.org/adr/ADR-110)。这提供了建立与内容管理网络连接所需的信息，内容管理网络被称为 Catalyst 节点的服务之一，同时也提供了 MAIN realm 通信服务的连接详情。

MAIN 通信服务通过 [WebSocket 连接器](https://github.com/decentraland/archipelago-workers)访问。这个轻量级组件使得与其余后端组件的交互成为可能，并且可以通过增加实例轻松扩展，以适应不断增长的用户负载，高效管理更多的活跃连接。通过 WebSocket 连接，客户端获取与 LiveKit Cloud 建立连接所需的数据，以及 `islandId` 由 Archipelago Service 分配。Archipelago Service 在 MAIN realm 和 Catalyst 节点通信服务中承担着相同的职责。它有效地管理用户位置的处理以及随后将其分配到不同岛屿的过程，每个岛屿都对应一个 Livekit 房间，从而根据用户在虚拟世界中的空间位置高效地组织用户群组。有关 Archipelago Service 的更多见解，你可以参考 [Archipelago](https://github.com/decentraland/docs/tree/main/contributor/communications/archipelago/README.md) 页面。

[NATS](https://nats.io/) 充当广播系统，促进各项服务之间的无缝通信。它可以支持多个 WebSocket Connector 实例与同一个 Archipelago Service 通信。此外，它还使 Stats 服务能够从 Archipelago 收集用户统计信息，例如位置和岛屿分组，并使这些数据可供外部使用。

Archipelago stats 服务与 Catalyst 节点中的 Archipelago 服务共享相同的 API 实现。你可以通过此链接查看该 API： [Catalyst API 规范](https://decentraland.github.io/catalyst-api-specs/#tag/Archipelago)。该服务可通过以下 URL 访问 `https://archipelago-stats.decentraland.org/` ，可用端点位于 `/comms/` 下，如 API 规范中所述，例如： `https://archipelago-stats.decentraland.org/comms/peers`.

该 [LiveKit](https://github.com/decentraland/docs/tree/main/contributor/communications/transport-types/livekit/README.md) 云平台负责通过 WebRTC 交换用户信息这一复杂任务，并且它是大多数 Catalyst 节点在同一目的下共享的主要云平台。

从 MAIN realm 得出的基本概念是，不同用户可以灵活地连接到任意 Catalyst 节点以进行内容管理（下载场景、穿戴品、表情动作，或发送个人资料更新），但尽管选择了特定的内容管理节点，通信服务的连接 **可以** 是相同的。因此，即使用户使用不同的 Catalyst 节点作为内容服务器，但当他们处于相近的场景坐标时，他们仍然能够彼此互动。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decentraland.org/contributor/contributor-zh/tong-xin/main-realm.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
