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

Switch to ActionCable and replace Tubesock #2703

Open
MrSerth opened this issue Dec 13, 2024 · 0 comments
Open

Switch to ActionCable and replace Tubesock #2703

MrSerth opened this issue Dec 13, 2024 · 0 comments
Labels
enhancement javascript Pull requests that update Javascript code ruby Pull requests that update Ruby code

Comments

@MrSerth
Copy link
Member

MrSerth commented Dec 13, 2024

TubeSock has been discontinued for quite some time already, but is still used in CodeOcean. In the recent years, Tubesock has caused multiple (performance) issues and serious bugs, so that we should really aim to replace it soon.

To address some bugs, we have even forked it: https://github.com/openHPI/tubesock

It would be time to replace the library with a more reliable solution and also use ActionCable for the given purposes. We use ActionCable already for pair programming sessions and made good experiences with it, so that It should be a good fit.

After switching, we can probably also rethink how we create submissions. Currently, each code run includes the two steps:

  1. A submission is created through AJAX
  2. The resulting submission (based on its ID) is then executed by establishing a dedicated WebSocket connection.

What about having just a single persistent WebSocket connection and use it for any implementation-related request (such as creating a submission, running the submission, ...)? This would improve performance and remove some unnecessary and complex code.

⚠️ When switching the WebSocket connection, one should pay attention not to break the Sentry integration. Currently, it shows the requests quite nicely:

Screenshot 2024-12-13 at 15 15 06

@MrSerth MrSerth added enhancement javascript Pull requests that update Javascript code ruby Pull requests that update Ruby code labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement javascript Pull requests that update Javascript code ruby Pull requests that update Ruby code
Projects
None yet
Development

No branches or pull requests

1 participant