> 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-ko/communications/overview.md).

# 개요

Decentraland 통신 시스템, 또는 간단히 *comms*는 레르름 내 플레이어 간 상호작용을 처리하는 실시간 메시징 프로토콜입니다.

이러한 상호작용 중 일부는 플레이어가 시작하고, 다른 일부는 클라이언트가 내부적으로 자동 처리합니다. 몇 가지 예:

* 텍스트 및 음성 채팅
* 플레이어가 이동할 때의 위치 업데이트
* 플레이어가 외형을 변경할 때의 아바타 업데이트

{% hint style="info" %}
오픈 소스를 사용해 통신 프로토콜이 실제로 동작하는 모습을 보고 직접 실험해 볼 수 있습니다 [Comms Station](https://decentraland.github.io/comms-station/).
{% endhint %}

이 기능의 대부분은 주변의 모든 플레이어에게 메시지를 브로드캐스트해야 하므로, 자동으로 다음이라는 이름의 근접 기반 클러스터로 그룹화됩니다. *아일랜드*. 각 플레이어는 한 번에 하나의 아일랜드에 할당되며, 세계를 여행하고 다른 플레이어들에 대해 상대적으로 이동함에 따라 이 할당은 변경됩니다.

플레이어를 아일랜드에 관리하고 할당하는 레르름 서비스는 *Archipelago*라고 불립니다. 필요할 때 아일랜드를 생성하고, 인구를 적절한 수로 유지하며, 이동에 따라 플레이어를 동적으로 재할당합니다.

```mermaid
flowchart LR
    하위그래프 Realm
        Players["플레이어<br/>⭐⭐⭐⭐⭐⭐⭐⭐⭐"]
        Archipelago["Archipelago"]
        
        하위그래프 Islands
            Island1["아일랜드 1<br/>⭐⭐⭐⭐"]
            Island2["아일랜드 2<br/>⭐⭐⚪⚪"]
            IslandN["아일랜드 n<br/>⭐⭐⭐⚪"]
        end
        
        Players --> Archipelago
        Archipelago --> Island1
        Archipelago --> Island2
        Archipelago --> IslandN
    end
```

아일랜드에 할당되면, 클라이언트는 메시지를 중계할 실제 백엔드에 연결하기 위한 아일랜드별 URI를 받게 됩니다. 이 연결은 Archipelago가 클라이언트를 다른 아일랜드로 재할당할 때까지 지속됩니다.

즉, [Archipelago](https://github.com/decentraland/docs/tree/main/contributor/communications/archipelago/README.md) 프로토콜 외에도 클라이언트는 여러 개의 *전송 수단*을 구현해야 하며, 각각은 지원되는 백엔드 중 하나를 통합 인터페이스로 감쌉니다.

### 클라이언트 생명주기 <a href="#lifecycle" id="lifecycle"></a>

comms 클라이언트의 생명주기는 몇 단계로 요약할 수 있습니다:

1. **레르름 선택**: 다음의 URI를 가져옵니다. [Archipelago](https://github.com/decentraland/docs/tree/main/contributor/communications/archipelago/README.md) 서비스.
2. **Archipelago에 참여**: 서비스와 영구 연결을 엽니다.
3. **아일랜드 (재)할당 받기**: 현재 위치를 보고하고 아일랜드별 URI를 가져옵니다.
4. **전송 수단 연결**: 아일랜드별 백엔드에 두 번째 연결을 엽니다.
5. **반복**: 3단계와 4단계를 계속 진행하면서 주기적으로 새 위치를 보고합니다.

클라이언트가 세션을 종료하면, Archipelago 서비스에서 단순히 연결을 끊습니다. 그러면 현재 아일랜드에서 자동으로 제거됩니다.

```mermaid
sequenceDiagram
    participant Archipelago
    participant Client
    participant IslandBackend as 섬 백엔드
    
    Note over Client: Archipelago에 연결
    Client->>Archipelago: 인증
    Archipelago->>Client: 수락
    
    Note over Client: 위치 보고
    Client->>Archipelago: 위치 보고
    Archipelago->>Client: 아일랜드 할당
    
    Note over Client: 아일랜드에 연결
    Client->>IslandBackend: 전송 수단 연결
    Client->>IslandBackend: 인증
    IslandBackend->>Client: 수락
    
    Note over Client,IslandBackend: 메시지 교환
    Client->>IslandBackend: 플레이어 메시지…
    IslandBackend->>Client: 플레이어 메시지…
    
    Note over Client: 위치 업데이트
    Client->>Archipelago: 위치 업데이트
    Archipelago->>Client: 아일랜드 재할당
    
    Note over Client: 이전 아일랜드에서 연결 해제
    Client->>IslandBackend: 전송 수단 연결 해제
    
    Note over Archipelago,IslandBackend: 사이클 반복
```

### 연결

comms 연결은 주로 웹소켓 기반이지만, 일부 전송 수단은 다른 방식을 사용할 수 있습니다.

다음으로 이동 [전송 수단](https://github.com/decentraland/docs/tree/main/contributor/communications/transports/README.md) 또는 [Archipelago](https://github.com/decentraland/docs/tree/main/contributor/communications/archipelago/README.md) 섹션에서 더 알아보거나, 자세한 내용은 특정 전송 수단 페이지를 참조하세요.

### 인증

comms에 대한 연결은 클라이언트가 서버가 제공한 챌린지에 서명하도록 하여 인증되며, 이는 [인증 체인](https://github.com/decentraland/docs/tree/main/contributor/auth/authchain/README.md) 섹션에서 설명한 것과 같은 규칙을 따릅니다.

페이지로 이동하거나 [Archipelago](https://github.com/decentraland/docs/tree/main/contributor/communications/archipelago/README.md) 특정 전송 수단을 확인하여 인증 흐름에 대해 더 알아보세요.

### 아일랜드

아일랜드는 플레이어들 사이에서 메시지를 브로드캐스트할 수 있는, 매우 동적인 플레이어 그룹이며, 다음에 의해 생성되고 유지됩니다. [Archipelago](https://github.com/decentraland/docs/tree/main/contributor/communications/archipelago/README.md) 세계에서의 이동에 대응하여.

아일랜드에는 미리 정의된 영역이나 중심점이 없습니다. 아일랜드는 안정적인 지리적 특징이 아니라, 근처 플레이어들의 임시적 결합일 뿐입니다. 어떤 아일랜드가 어떤 지역을 덮고 있다고 말할 수 있다면, 그것은 단지 현재 그 구성원들이 그 구역에 퍼져 있기 때문입니다.

플레이어가 없는 지역에는 아일랜드가 0개일 수 있고, 인구가 매우 많은 지역에는 여러 개의 겹치는 아일랜드가 존재할 수 있습니다. 모든 사람을 같은 그룹에 할당하면 실시간 브로드캐스팅이 불가능해지기 때문입니다.

Decentraland 네트워크의 각 서버는 최대 아일랜드 인구 수와 플레이어들이 근처에 있다고 간주되는 거리를 구성할 수 있습니다. 기본값으로, 아일랜드는 서로 100미터 이내에 있는 최대 100명의 플레이어를 수용할 수 있습니다.

아일랜드에 할당되고 합류하는 흐름은 [Archipelago](https://github.com/decentraland/docs/tree/main/contributor/communications/archipelago/README.md) 섹션에서 설명한 것과 같은 규칙을 따릅니다.

### 메시지

comms 프로토콜의 메시지는 [프로토콜 버퍼](https://github.com/protocolbuffers/protobuf)를 사용해 직렬화된 이진 블롭이며, [Packet](https://github.com/decentraland/docs/tree/main/contributor/communications/messages/README.md#Packet) 구조로 감싸져 있습니다.

{% hint style="info" %}
단어 *메시지* 를 comms의 맥락에서 사용할 때는 항상 플레이어들 간에 교환되는 채팅 메시지가 아니라, 이진 메시지 프로토콜을 가리키는 것입니다.
{% endhint %}

다양한 실시간 상호작용 흐름에 대한 여러 종류의 메시지가 있습니다. 더 알아보려면 [메시지](https://github.com/decentraland/docs/tree/main/contributor/communications/messages/README.md) 섹션으로 이동하세요.


---

# 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-ko/communications/overview.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.
