4 ms·
By putting all the state into a single CRDT then yes, you're going to get conflict resolution across the entire document. But you might also want to think about
by zknill 2y ago
By putting all the state into a single CRDT then yes, you're going to get conflict resolution across the entire document. But you might also want to think about how big that CRDT state is going to get.
There's no splitting or isolation available here, you need to load the entire Y.Doc to get any of the content of the page. The content of the Y.Doc is opaque bytes, and if you dump it to some other representation (like JSON) then you lose the internal Y.Doc counters that make conflict resolution work.
- jitl 2y agoYjs had a “subdocument” facility for dividing up content for lazy loading, although I’m not exactly sure if or how cross-doc transactions would work. https://docs.yjs.dev/api/subdocuments https://docs.yjs.dev/api/subdocuments If you compare Ydoc for a very large page with many items to a web API maybe it seems like it could be a bit big, but traditional file document in an editor like Pages are frequently several megabytes, it really doesn’t seem spooky to me in a truly local first app where you will delta sync.