this post was submitted on 26 Feb 2024
6 points (87.5% liked)

Programming

16240 readers
146 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 [email protected]



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!

top 2 comments
sorted by: hot top controversial new old
[โ€“] Blue_Morpho 2 points 4 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).

[โ€“] [email protected] 2 points 4 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.