OctoBase
OctoBase copied to clipboard
Port CRDT operations
### Tasks
- [ ] https://github.com/toeverything/OctoBase/pull/408
- [ ] https://github.com/toeverything/OctoBase/issues/404
- [ ] https://github.com/toeverything/OctoBase/issues/411
- [ ] #413
- [ ] #430
- [ ] https://github.com/toeverything/OctoBase/pull/421
- [ ] https://github.com/toeverything/OctoBase/pull/422
- [ ] #440
- [ ] https://github.com/toeverything/OctoBase/issues/405
- [ ] #438
- [ ] #449
- [ ] https://github.com/toeverything/OctoBase/issues/409
crdt ops in yjs can be divided into two categories: map and list.
- map:
YMap/YXmlElement - list:
YArray/YXmlFragment - list with format:
YText/YXmlText
Both map and set use item.left and item.right to form a series of items into a linked list.
The difference is that the map does not care about the key order and contains parentSub(key), while the list does not.
YText and YXmlText are implemented slightly different from list to increase support for Format, but the final operation logic is similar.