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
 

I wrote a post about how our Operational Transfomation (OT) algorithm works at Fiberplane. OT is an algorithm that enables real-time collaboration, and I also built and designed our implementation. So if you have any questions, I'd be happy to answer them!

you are viewing a single comment's thread
view the rest of the comments
[โ€“] Blue_Morpho@lemmy.world 1 points 8 months ago (1 children)

transforms the successor in such a way that the end result is still what the author of the successor intended.

It says that it supports multiple but how would that actually work for more than 2?

You have 3 people who see the word two in a list and 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. Appending based on previous position isn't what they intended (contrasted with the example given where it was their intent).

[โ€“] arendjr@programming.dev 2 points 8 months ago

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.