3 ms·
https://github.com/vlcn-io/cr-sqlite/ https://github.com/vlcn-io/cr-sqlite/ > Tables are modeled as GSets... > Rows are currently modeled as LWW maps. I.e., e
by AlexErrant 4y ago
https://github.com/vlcn-io/cr-sqlite/ https://github.com/vlcn-io/cr-sqlite/
> Tables are modeled as GSets...
> Rows are currently modeled as LWW maps. I.e., each column in a row is a LWW Register.
Multi value registers are also planned - though I'm not sure how that'll be implemented.
(One also has the opportunity to see failing writes to the LWW register, so for my app I can (in theory) potentially surface those somewhere to the user as a resolvable conflict.)
- burdiyan 4y agoYeah, I've seen this project. Looks pretty interesting! Although probably the most challenging data type to get right would be RGA, especially for text. Not to mention rich text :) Sets and registers in the end are pretty straight-forward as soon as one understand the idea of causality, partial order, and arbitrary total order. In terms of the implementation there's also not a lot to optimize I believe, and at worst you could simply store a counter along with the value. But RGA is a whole different story. Especially in the context of SQLite, which doesn't have default page compression, or prefix compression for keys. Still, one probably could put together something similar to how Yjs deals with that, and store chunks of data as rows in a table.