3 ms·
We took a super simple (IMO) approach to collaborative editing in my current project: Each block of text has a version number which must be incremented by one
by chromatin 3y ago
We took a super simple (IMO) approach to collaborative editing in my current project:
Each block of text has a version number which must be incremented by one by the client at the time of submission. The database provides conflict prevention by uniqueness constraint which bubbles up to the API code. The frontend is informed of conflict, so that the user can be notified and let the human being perform conflict resolution.
Because most concurrent users are working on different blocks, this works great.
- zknill 3y agoHow do you handle getting the changes that one client makes onto the other clients? Are you pushing it from the server to the clients with websockets, or waiting for the clients to ask for new info, or waiting for the conflict to happen when someone else tries to make a change, or something else? I'm thinking a lot about keeping server and client data in sync while working on our hopefully-soon-to-be-released LiveSync product[1] [1] https://ably.com/livesync https://ably.com/livesync
- chromatin 3y agoWhen the client gets HTTP 409 Conflict, it asks for the current version and presents to the user for manual resolution