https://github.com/yjs/yjs/blob/main/INTERNALS.md
https://www.youtube.com/watch?v=0l5XgnQ6rB4 - internals
- 5:20 - defining a type gives you a view into the Items in the CRDT structure. The type is responsible for taking the Items (a linked list) and representing that to the user
- 7:15 - all types extend AbstractType
- 7:50 - everything is a linked list. He implemented a sequence CRDT, and then added maps and XML elements on top of that.
- 9:00 - codebase is small because basically everything is an Item.
- 10:40 - AbstractType always has a list CRDT, and the _start property tells you the first item. Also always has a _map property which maps previously-defined arbitrary string to CRDT, which is the last item in the list CRDT. (This is Replace Operation Manager in the whitepaper.)
- 14:06 - _map is a utility so if the AbstractType is actually storing a map you can look up the last value from the key
- 16:44 - to store tree of directories and their files, you could have a Map that is the file name, and th