|
|
|
|
|
by superasn
1622 days ago
|
|
Hi! I want to create a web app like Google docs where multiple users can collaborate in real time to edit the document together (using a special link like gdocs generate). I want to save the docs in a MySQL db (no firebase) My questions are: 1) Since multiple people are working together how does one manage conflicts, i.e. 2 people sending different edits simultaneously. 2) If one clients gets disconnected (4g) and then reconnects later how does it sync the changes it made during it was offline? I recently watched this RAFT presentation (1) and I think I would need to use something like this? What other alternatives are viable? Also can I make it happen using just PHP, Javascript and MySQL? Thanks (1) http://thesecretlivesofdata.com/raft/ |
|
It uses operational transformations ("OT") to manage conflicts, and it saves the data in MySQL. Technically any Django DB backend will work for storage, but the public demo instance uses MySQL.
One of the reasons I made this thing was to show that realtime apps don't need to require heavy frameworks or unusual databases. And it loads super fast.
I don't think you need Raft if you have a central database storing the document. You could also consider using CRDTs instead of OT, which may be more powerful but also more challenging to develop.