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

feat: Maintainers wanted for wsLink #6109

Open
KATT opened this issue Oct 12, 2024 · 0 comments · May be fixed by #6223
Open

feat: Maintainers wanted for wsLink #6109

KATT opened this issue Oct 12, 2024 · 0 comments · May be fixed by #6223
Labels
🙋‍♂️ help wanted Extra attention is needed

Comments

@KATT
Copy link
Member

KATT commented Oct 12, 2024

We need maintainers for wsLink

Help us in revamping tRPC's WebSocket support!

Since we introduced subscriptions using httpSubscriptionLink, the core team no longer relies on wsLink as we handle subscriptions over HTTP. Consequently, we've decided to deprecate wsLink and invite the community to take over its maintenance. 🙏

The current implementation is located here. As you might notice, it's not well-written; each modification has added complexity, and it urgently needs a rewrite.

We recognize the value of having tRPC support for WebSockets and would love to see it actively maintained by passionate developers like you. 🌟 We'll happily guide you around the codebase to get you started!

What we'd like to see

We want a revamped version of wsLink and createWSClient that supports the existing features:

  • Lazily closing/opening connections when needed.
  • 🔄 Resumes subscriptions if the server stops.
  • 🔁 Gracefully switches connections to a new one if the server notifies it's about to close.
  • 🚀 Restarts with backoff when it fails.
  • Supports queries, subscriptions, and mutations.
  • 🔍 Supports introspection of the current connection status of the active socket.
  • 🏓 Ping/Pong support to detect and close inactive connections.

Additionally, we'd want it to:

  • ✍️ Be well-written.
  • Be thoroughly tested. Existing tests should pass any implementation.
  • 📚 Include comprehensive documentation.
  • 🪝 Have a React-hook for introspecting the connection state - e.g. useConnectionState(wsClient)

Alternatives we've considered

  • We're also considering financial funding as an option. We estimate that investing a few thousand dollars would enable us to dedicate the necessary time to rewrite it. 💰
  • If we don't find maintainers, we'll likely delete the wsLink in v12 of tRPC. 🗑️

If you're interested in contributing or taking over the maintenance of wsLink, please reach out! Your contributions can make a significant impact on the tRPC community. 🙌


Funding

  • You can sponsor this specific effort via a Polar.sh pledge below.
  • We receive the pledge once the issue is completed & verified. 🎯
Fund with Polar
@KATT KATT added the 🙋‍♂️ help wanted Extra attention is needed label Oct 12, 2024
@hmatthieu hmatthieu linked a pull request Nov 12, 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
🙋‍♂️ help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant