Let's say we have an web application that allows multiple users to write in a text field. For instance: let's say that we have user1 and user2 using the application simultaneously.
- At the beginning the text field is empty.
- User1 writes "Hello world" and clicks the send button.
- After that, both user1 and user2 see the "Hello world" on the text field.
- User2 erases the "world" word and writes "galaxy" then sends the message.
- Now both user1 and user2 see "Hello galaxy".
- And so on......
But there are cases that data will be lost, principally when both users are editing the text field at the same time. How can I do to fix this problem? Is there a way? If not, what is the best way to do something like that? Thank you guys!
Aucun commentaire:
Enregistrer un commentaire