Data Modeling
Schema decisions that cause data corruption or sync issues.
Complex Objects in Reorderable Arrays
Y.Array delete + insert creates copies, not moves. Concurrent reordering causes duplicates or data loss.
Fix: Store content in Y.Map, only IDs in Y.Array. See ID-Based Storage.
Index-Based References
Array indices change on insert/delete. References break silently.
Fix: Use stable IDs:
Large Binary Data in CRDT
CRDT metadata adds 2-10x overhead. History accumulates. Sync becomes slow.
Fix: Use blob storage, store only reference:
Checklist
- Complex content in Y.Map with IDs, order in Y.Array
- All references use stable IDs, not indices
- Binary data external, only references in CRDT