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

Socket.io vs. raw websockets #22

Open
lars-reimann opened this issue Dec 4, 2023 · 3 comments · May be fixed by #106
Open

Socket.io vs. raw websockets #22

lars-reimann opened this issue Dec 4, 2023 · 3 comments · May be fixed by #106
Assignees
Labels
enhancement 💡 New feature or request question Further information is requested

Comments

@lars-reimann
Copy link
Member

lars-reimann commented Dec 4, 2023

Is your feature request related to a problem?

Socket.io is a protocol for bidirectional communication. It uses websockets internally when available, but can also fall back to other technologies. Compared to raw websockets, we

  • lose some flexibility for our protocol design,
  • gain a well-tested, rigid framework for our protocol,
  • get extra features like disconnection detection or automatic reconnection.

Desired solution

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

@lars-reimann lars-reimann added enhancement 💡 New feature or request question Further information is requested labels Dec 4, 2023
@lars-reimann lars-reimann added this to DSL Dec 4, 2023
@github-project-automation github-project-automation bot moved this to Backlog in DSL Dec 4, 2023
@WinPlay02
Copy link
Contributor

I don't think a switch to socketio would be needed in the near future.

  • Disconnections could be detected in the extension by adding callbacks to the onclose event of the existing websocket connection.
  • Automatic reconnection is already (partially) implemented in the extension, by trying to spawn a new runner if the existing one crashed or became unusable. This could easily be expanded with the before mentioned disconnection detection.
  • I don't think the switch would fix issue Possible deadlock while running tests #18, as subprocesses would still be required.
  • I don't think the fallback option (HTTP polling) is desirable (and needed). In a local environment, we should always expect websockets to work (so there is little need for fallback options).

Though I very much agree on the easier testing argument.

@lars-reimann
Copy link
Member Author

lars-reimann commented Dec 5, 2023

All valid points. Let's talk about this on Thursday.

@lars-reimann
Copy link
Member Author

Apparently, the W3C is also working on another means for bidirectional communication, called WebTransport. Socket.io v4 recently added support for this, allowing us to use WebTransport without further changes to our code, once it's widely available.

@lars-reimann lars-reimann self-assigned this Apr 22, 2024
@lars-reimann lars-reimann moved this from Backlog to Todo in DSL May 2, 2024
@lars-reimann lars-reimann linked a pull request May 2, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 💡 New feature or request question Further information is requested
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

2 participants