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

added nhooyr websocket #127

Closed
wants to merge 1 commit into from
Closed

added nhooyr websocket #127

wants to merge 1 commit into from

Conversation

ElecTwix
Copy link
Contributor

overall better websocket connection
this will also help for reconnect later

overall better websocket connection
@ElecTwix ElecTwix changed the title added nhooyr websockets added nhooyr websocket Feb 17, 2024
@timpratim
Copy link
Contributor

Hi @ElecTwix, firstly, I want to thank you for the time and effort you've put into submitting the PR. We genuinely appreciate your initiative to enhance the SDK.

After careful consideration, we've decided not to merge this PR at this time. This decision stems from our current focus on maintaining a minimal set of dependencies and ensuring the SDK remains as streamlined as possible. Introducing another WebSocket implementation could complicate the library's dependency management and potentially impact its long-term maintainability.

Thank you once again for your understanding and your contribution to SurrealDB. Please feel free to reach out if you have any questions.

@timpratim timpratim closed this Mar 4, 2024
@ElecTwix
Copy link
Contributor Author

ElecTwix commented Mar 4, 2024

Hi @timpratim, First of all Thanks for your reply,

While Gorilla is often considered suitable for minimal projects, it might not be the most lightweight option. nhooyr's ws package specifically aims to be minimal and idiomatic for Go, aligning with our focus on a streamlined approach. As you mentioned, "streamlined" and "minimal" are nhooyr's ws main focuses.

Even the Go standard library's websocket package mentions that their package is lacking, so they recommend the nhooyr's ws.
src

@gedw99
Copy link

gedw99 commented Mar 29, 2024

hey all,

nhooyr's usage would have allowed me to call surrealdb.wasm in the browser too.

so then reactive at runtime in browser and server architectures are possible.

@gedw99
Copy link

gedw99 commented Apr 4, 2024

https://github.com/timpratim rejected it , but why ? it said " minimal set of dependencies "

Maybe do what the NATS team did then. they write their own : https://github.com/nats-io/nats-server/blob/main/server/websocket.go

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.

3 participants