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

✨Collaboration long polling fallback #517

Draft
wants to merge 4 commits into
base: refacto/collaboration-process
Choose a base branch
from

Conversation

AntoLC
Copy link
Collaborator

@AntoLC AntoLC commented Dec 18, 2024

Purpose

Some users have their websockets blocked, so they cannot collaborate.
If they are connected with other collaborators at the same time, it will create constant conflict in the document.

Proposal

We will use the long polling as a fallback when the websocket is not able to connect.

Cases to solve:

  • user without ws <--> user with ws
  • user without ws <--> user without ws
  • user without ws first <--> user without ws <--> user with ws
  • manage right editing
  • manage correctly the fallback ( x failures trigger the fallback ?)
  • increase/decrease polling frequency depend the collaborators amount ?
  • helm charts to use ngnix sub auth
  • tests

@AntoLC AntoLC self-assigned this Dec 18, 2024
@AntoLC AntoLC changed the title ✨Collab long polling ✨Collaboration long polling fallback Dec 18, 2024
@AntoLC AntoLC force-pushed the feature/collab-long-polling branch 2 times, most recently from 14d4b6c to 1360973 Compare December 23, 2024 15:57
Create the route '/collaboration/poll/' to interact
with the hocus pocus-server from a http request.
It will be used to poll the server for changes in the
collaboration document.
We add the routes "/collaboration/poll/" to
the nginx configuration file to allow the
frontend to poll the server for changes in the
document.
We updated the useCollaborationUrl hook to
return the new route.
When the websocket cannot connect, after a certain
amount of retry, the system will fallback to long
polling to keep the document sync.
If the websocket is connected, the system will
automatically switch back to websocket and stop
long polling.
@AntoLC AntoLC force-pushed the feature/collab-long-polling branch from 1360973 to 55238a7 Compare December 23, 2024 16:18
@AntoLC AntoLC changed the base branch from main to refacto/collaboration-process December 23, 2024 16:19
@AntoLC AntoLC mentioned this pull request Dec 23, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant