How to save during real-time collaboration
- by dev.e.loper
I want multiple users to edit same document. Problem I'm facing is when a new user joins, he might see an outdated document. How do I make sure that new users get most recent changes?
Some solutions I thought of:
Save on every change. I don't like this solution because it will slow things down on UI and put load on db.
When new user joins, trigger save on all other clients. After other clients saved, load document. With this there can be inconsistency still.
Any other suggestions would be helpful.