HACKER Q&A
📣 monroewalker

Simple operational transformation approach for collaborative editing?


I'm planning wiki-like pages for a webapp which will be editable by every user. Real-time collaborative editing isn't a priority, so the approach I'm currently targeting is to just use some sort of lock that restricts edit access to a single user at a time and expires after some amount of inactivity by them. If two users were going to be touching very different parts of the document, however, it seems unfortunately restrictive for only one to have access at a time. Using CRDTs or a thorough implementation of OT would be much more work me than it's worth, but I'm wondering if there's some middle ground with OT which achieves some level of real-time editing without requiring a complex implementation. For example, it seems possible to still use locking but apply it to block level elements in the document as opposed to the document as a whole. Once a user starts editing a block, it becomes untouchable by other users until that first user moves to a new area of the document or leaves.

I imagine this has been done before, so I'd like to know if anyone is aware of any good write-ups on lighter OT implementations


  👤 manx Accepted Answer ✓
This could help: https://automerge.org