4 ms·
Interesting, looks like Firebase syncs the who record at a time, how do you avoid conflicts with 2 people editing at the same time?
by tobinharris 12y ago
Interesting, looks like Firebase syncs the who record at a time, how do you avoid conflicts with 2 people editing at the same time?
- jfroma 12y agoIt uses a theory called Operational Transformation [1] which is roughly the base for most collaborative tools like google docs. My first attempt was using a library called ot.js [2], I changed it to support an async db since it only supported a in-memory store and I adapted to use mongodb. The experiment is in [3] and it has some bugs still. Then I found out the guys at firebase adapted ot.js client side to work with their own db, and created something called Firepad [4]. So, I used that instead which was more stable and I added auth and authn. [1]: https://en.wikipedia.org/wiki/Operational_transformation https://en.wikipedia.org/wiki/Operational_transformation [2]: https://github.com/Operational-Transformation/ot.js/ https://github.com/Operational-Transformation/ot.js/ [3]: http://github.com/auth0/mdocs http://github.com/auth0/mdocs and http://mdocs.io http://mdocs.io [4]: http://www.firepad.io/ http://www.firepad.io/