OctoBase icon indicating copy to clipboard operation
OctoBase copied to clipboard

Port CRDT operations

Open Brooooooklyn opened this issue 2 years ago • 1 comments

### 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

Brooooooklyn avatar Apr 24 '23 10:04 Brooooooklyn

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.

darkskygit avatar Apr 28 '23 02:04 darkskygit