Does Teable use a CRDT? #840
-
I have seen a PR that mentions a CRDT #191, but looking at the source code reveals
A common CRDT implementation seen in many places nowadays is Yjs, in case a switch would be possible to consider. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This was a typo. I originally meant to write CRUD 😂. We use OT(JSON0) as a collaborative algorithm YJS is an excellent CRDT implementation. Before starting our project, we extensively researched collaborative algorithm libraries such as YJS, Loro, Automerge, and JSON0. While CRDT has many advantages, based on our project's specific characteristics, we chose the ShareDB framework, which is based on the OT algorithm library (JSON0). ShareDB not only provides a collaborative algorithm implementation but actually handles the entire collaborative backend synchronization logic. In comparison, YJS only implements document-level collaboration. This choice saved us a significant amount of time. The central server requirement of the OT algorithm wasn't an issue for us. Due to our extensive permission control needs, Teable (possibly) must be designed as a web application with a centralized server. The centralized nature of ShareDB allows it to handle derived data, such as the c = a + b problem, which is extremely difficult to achieve with CRDT algorithms. For instance, if user A modifies a from 1 to 2, and user B modifies b from 1 to 2, under a CRDT algorithm, the calculation of c would need to be done separately on both A and B's clients. This would result in c equaling 3. However, with a centralized server, we can use transaction locks to ensure that c is correctly calculated as 4. |
Beta Was this translation helpful? Give feedback.
This was a typo. I originally meant to write CRUD 😂. We use OT(JSON0) as a collaborative algorithm
YJS is an excellent CRDT implementation. Before starting our project, we extensively researched collaborative algorithm libraries such as YJS, Loro, Automerge, and JSON0. While CRDT has many advantages, based on our project's specific characteristics, we chose the ShareDB framework, which is based on the OT algorithm library (JSON0).
ShareDB not only provides a collaborative algorithm implementation but actually handles the entire collaborative backend synchronization logic. In comparison, YJS only implements document-level collaboration. This choice saved us a significant amount of time.
Th…