Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Feature] Incremental State Sync

Đang mở
#229 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
distributed-systems

Hướng nghiên cứu

Bắt đầu bằng cách đọc module thử nghiệm partysync và phần tích hợp Durable Objects. Sử dụng tài liệu về schema và state của Colyseus được liên kết trong issue làm tài liệu tham chiếu cho protocol, sau đó xác định phạm vi của các delta tăng dần được nén, việc replication state từ server đến client và các listener của client trước khi triển khai.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hi everyone! I saw the experimental partysync module and was wondering if it could support an incremental state sync protocol.

I'm imagining something similar to https://github.com/colyseus/schema. It's a library that basically automatically syncs JS classes to client listeners. It's very optimized, serializing and emitting only compressed binary deltas of any changes of state.

For example you can have a class like the following server side, which would sync the player object to all clients whenever a property changes:

export class Player extends Schema {
  @type("string") name: string;
  @type("number") x: number;
  @type("number") y: number;
}

const player = new Player()

This makes the developer experience of making realtime multiplayer games really seamless, as all your state can be replicated on both the server and client with minimal overhead.

There are some great docs going into more detail here: https://docs.colyseus.io/state.

However, Colyseus schema doesn't have an integration with Durable Objects yet. So having sync functionality like this built into partykit/partysync with a tight integration to Durable Objects would be great to enable apps like realtime multiplayer video games!

Ngôn ngữ chính
TypeScript
Star
1.3k
Fork
84
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cloudflare/partykit

Tất cả issue của cloudflare/partykit

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.