this post was submitted on 26 Feb 2024
4 points (100.0% liked)
Programming
17416 readers
62 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Generally, I don't think it really matters how many people are involved for the conflict resolution how many people are editing. There is one person who will reach the server first, and then the other(s) need to apply transformation(s).
But I think in your example the tricky part is when you say "each want to add their item as 3rd in the list because it is a todo list and its place in the list is important". The algorithm will be able to resolve for each of them that their item will come after the 2nd, and before what was originally the 3rd. But it will not be able to put them all on the 3rd position, of course, so it will sort their items and insert them adjacent to one another. So with 3 people inserting simultaneously into the 3rd position, one will end up in the 4th position and one in the 5th.