Skip to content

Swap websocket lib#70

Merged
Sayan- merged 6 commits intomainfrom
sayan/websockets
Sep 27, 2025
Merged

Swap websocket lib#70
Sayan- merged 6 commits intomainfrom
sayan/websockets

Conversation

@Sayan-
Copy link
Contributor

@Sayan- Sayan- commented Sep 24, 2025

Overview

As I spent more time with this lib I noticed a few things I wasn't a huge fan of (no concurrency, ~incomplete compression, some surprises with deadlining). Opt'ing to swap over to the coder/websocket library that I've used successfully in prod for ~years

Testing

Built docker + unikernel images. Tested the unikernel images against the wip test suite

TL;DR

Replaced the gorilla/websocket library with coder/websocket for handling Chrome DevTools connections.

Why we made these changes

The previous library had limitations regarding concurrency, compression, and connection deadlining. The coder/websocket library is a more robust, production-proven alternative that resolves these issues.

What changed?

  • Updated go.mod and go.sum to swap the websocket libraries.
  • Refactored server/lib/devtoolsproxy/proxy.go to use the new coder/websocket API for accepting, dialing, and managing connections.
  • Updated tests in server/lib/devtoolsproxy/proxy_test.go to align with the new implementation.
  • Replaced echo -n with printf in server/cmd/api/api/process_test.go for better test compatibility.

Description generated by Mesa. Update settings

@Sayan- Sayan- marked this pull request as ready for review September 26, 2025 21:12
@Sayan- Sayan- requested a review from rgarcia September 26, 2025 21:17
@Sayan- Sayan- merged commit 2d73dc8 into main Sep 27, 2025
6 of 8 checks passed
@Sayan- Sayan- deleted the sayan/websockets branch September 27, 2025 00:42
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