> 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).

# 主 Realm

Decentraland 拥有与提供通信服务的 Catalyst 一样多的领域，但有一个名为 MAIN 的独特领域，它存在于 Catalysts 网络之外。MAIN 领域专门设计用于简化用户连接流程，使用户更容易互动和见面。它由一组能够替代 Catalyst 节点通信服务的服务构成。该领域作为用户登录 Decentraland 后的默认目的地。

![](https://github.com/decentraland/docs/blob/main/images/main-realm.png)

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

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

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

Archipelago stats service 与 Catalyst 节点中的 Archipelago service 共享相同的 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/blob/main/contributor/communications/transport-types/livekit/README.md) 云平台负责通过 WebRTC 交换用户信息这一复杂任务，它也是大多数 Catalyst 节点为相同目的共享的主要云平台。

源自 MAIN 领域的基本概念是，不同用户可以灵活地连接到任何 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
