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

Set a Time Limit for Stuttering Suppression on Each Path in Realtime Collaboration #353

Merged
merged 2 commits into from
May 6, 2024

Conversation

loreanvictor
Copy link
Contributor

@loreanvictor loreanvictor commented May 6, 2024

Checklist

  • I documented the TypeScript code using JSDoc style.
  • [x] I added multiple screenshots/screencasts of my UI changes (NA)
  • [x] I translated all the newly inserted strings into German and English (NA)

Motivation and Context

During realtime collaboration, Apollon optimistically drops some incoming changes it predicts that will be overwritten by some future change, based on changes the client itself has issued on specific paths on the diagram. This suppression continues until the client receives a "confirmation" patch from the server (representing the change that the client predicted would overwrite suppressed changes).

In some cases, due to network loss, this confirmation change might not be received by a client. In these situations the client will indefinitely suppress all incoming changes on particular paths erroneously.

Description

This change sets up a timed control for suppression of incoming changes on each path. After a certain time has passed from the last local change on some specific path, the client will stop suppressing incoming changes on said path.

This prevents lock-in due to network loss, but still allows realtime collaboration to operate smoothly.

Steps for Testing

  1. Clone Apollon Standalone
  2. Link Apollon Standalone with local Apollon build
  3. Run Apollon Standalone
  4. Create a diagram and share it in "Collaborate" mode. Open two browsers to that link and collaborate on the diagram.
  5. You should not see a client stuck and not applying the changes from the other client properly. The two clients should remain convergent.

Test Coverage

File Branch Line
services/patcher/patcher.ts 96.77% 100%
services/patcher/patch-verifier.ts 100% 100%

Copy link
Collaborator

@matthiaslehnertum matthiaslehnertum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@matthiaslehnertum matthiaslehnertum merged commit fd8d4f0 into develop May 6, 2024
4 checks passed
@matthiaslehnertum matthiaslehnertum deleted the bugfix/fix-stuttering-prevention-lock-in branch May 6, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants