Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict resolution for collaborative editing. #45

Open
Aryaman1706 opened this issue Mar 11, 2021 · 8 comments
Open

Conflict resolution for collaborative editing. #45

Aryaman1706 opened this issue Mar 11, 2021 · 8 comments

Comments

@Aryaman1706
Copy link

Aryaman1706 commented Mar 11, 2021

Is your feature request related to a problem? Please describe.

  • In the current implementation, the message received via socket connection is set as a value for the editor as well. There is no conflict resolution strategy.
  • For example:-
    If one user types "foo" in front of "bar" and the other types "baz" after "bar" at the same time, you will notice inconsistencies.
    To handle this we need some kind of conflict resolution strategy.
  • Demo Link

Describe the solution you'd like

Motivation

  • Resolving conflicts in the editor to maintain consistency for all the participants of a room.

Are you willing to contribute to this issue?

  • Yes

Describe alternatives you've considered

  • These are the only conflict resolution algorithms I know of. Personally, I cant see an alternative.

Additional context

  • I would like to work on this issue. I have implemented Operational Transformation previously.
  • Can you please assign this issue to me?
  • This is a major change and I would suggest discussing it beforehand.
@kothariji
Copy link
Owner

Hi @Aryaman1706, First of all, thank you so much for taking out the time to create this issue. 🚀

We will try to analyze these algorithms and will get back to you shortly, that what we can do in this scenario.
Also, @nehaparmar99, can you please look into this issue and share your reviews 🙌

@akash-salvi akash-salvi added GSSOC21 Level2 Bug fixing, adding small features. (level 2) Priority: Medium labels Mar 13, 2021
@Aryaman1706
Copy link
Author

So I have read more on both these algorithms to figure out which one would be better.
Links in my previous comment depicts why do we need any of them.

Here is a very nice article comparing OT with CRDT. It covers up most of the things without going into technical details of algorithms.

It basically boils down to this:

  • OT requires a central server to store a log of all the operations which I know expands crazy fast.
  • CRDT does not require a central server but the document's size increases by around 1.5x.

But we can cut out the operation logs in OT by just restricting it to a limited number and deleting all of them if there is only one active user editing the document.

I would love to discuss it further.
Thank You.

@kothariji
Copy link
Owner

@Aryaman1706 I went through both of these algorithms and they are pretty amazing.
So, talking about OT, we currently don't have a central server to transfer data from 1 peer to another. We have implemented socket programming, keeping web-RTC in mind.
So if we use OT in our express(backend), do you think it will increase latency, and socket communication speed will decrease eventually?
Also here is my discord username - kothariji#7469, we can connect there for further discussions.

Happy Contributing 🙌

@subhangi2731
Copy link
Contributor

please assign me this

@subhangi2731
Copy link
Contributor

@kothariji ??

@kothariji
Copy link
Owner

Hey @subhangi2731, before assigning this issue to you, can you please tell me, which algorithm are you going to use for conflict resolution, also what workflow are you going to follow, and implementation details about frontend / backend.

@subhangi2731
Copy link
Contributor

@kothariji The algorithm which I will use is Operational Transformation which will allow systems to collaboratively perform a common task and then the technique will allow users to keep track of operations performed on shared data as a means of keeping track of changes in the data.

@subhangi2731
Copy link
Contributor

I need to read the code more of the project then I will share u implementation details of frontend/backend

@kothariji kothariji removed GSSOC21 Level2 Bug fixing, adding small features. (level 2) labels Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants