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

Use existing (3rd party) signaling server implementation #55

Open
2 tasks done
WofWca opened this issue Aug 29, 2023 · 2 comments
Open
2 tasks done

Use existing (3rd party) signaling server implementation #55

WofWca opened this issue Aug 29, 2023 · 2 comments
Assignees

Comments

@WofWca
Copy link

WofWca commented Aug 29, 2023

Checklist

Is your feature request related to a problem? Please describe.
Currently y-webrtc uses a custom server for signaling. I think this is not ideal because it's a comparatively niche thing. Sometimes public servers go down (#43), creating a big headache for app developers that now have to set up a new server (that might go down as well). Having a custom server also adds maintenance costs.

Describe the solution you'd like
Rely on another existing server that can be used for signaling. For example, https://github.com/peers/peerjs-server. Or, I heard, you can use https://github.com/centrifugal/centrifugo for signaling (there is a concept of rooms (channels) as well).

Describe alternatives you've considered

None

Additional context

I'm not 100% sure this is a good idea, and I didn't look into details of how the current signaling server works, or how Centrifugo works. It's just a high-level idea that I think it makes sense to strive for.

@ngryman
Copy link

ngryman commented Oct 24, 2023

I had the same concerns and went ahead by creating a Rust-based signaling server here. You can host it for free on fly.io.
I'm currently using it for my app and I expect to maintain it in the future.

Posting it here in case anyone is interested :)

@WofWca WofWca changed the title Use existing signaling server implementation Use existing (3rd party) signaling server implementation Nov 13, 2023
@glebbash
Copy link

glebbash commented Oct 19, 2024

It's also very easy to host the signaling server for free on deno deploy. Here is how I did that: https://github.com/glebbash/deno-yjs-signaling-server/tree/main.

But it's probably even easier than this now since Deno 2 supports more of the Node APIs and you can probably just use the node version.

NOTE: Deno Deploy is a serverless runtime so peer discovery will depend on which regional server you are connected to (afaik there is no way to connect to specific server) so in this case you might want to deploy the server to Fly.io (single instance) instead (both Node.js and Deno are supported).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants