Files
nexus/wiki/entities/Yjs.md
2026-05-03 05:42:12 +08:00

1.1 KiB
Raw Blame History

title, type, tags, last_updated
title type tags last_updated
Yjs entity
2026-03-05

Identity

Type: Product产品/开源库) Source: nexus-spatial-discovery

Definition

Yjs 是 Nexus Spatial 采用的协作引擎——基于 CRDTConflict-free Replicated Data Types无冲突复制数据类型的实时协同编辑库用于多用户空间协作场景下的冲突无关并发编辑。

Why CRDT for Spatial Collaboration

传统 OTOperational Transform方案在高延迟、离线编辑场景下存在冲突风险。CRDT 的优势:

特性 OT CRDT (Yjs)
离线编辑 需要复杂补偿 天然支持
节点延迟容忍
实现复杂度
网络分区恢复 困难 自动

在 Nexus Spatial 中的应用

  • 多用户同时编辑 3D 节点图
  • 实时协作状态同步WebRTC P2P
  • 无需中心服务器协调——去中心化协作
  • 支持 100+ 并发协作者(无写入冲突)

Connections