yjs / y-webrtc

WebRTC Connector for Yjs
MIT License
458 stars 111 forks source link

signalling service with socket.io #15

Closed disarticulate closed 3 years ago

disarticulate commented 3 years ago

Is there anyway we can get the signalling to work through socket.io? I think that might broaden the support since that's a standard service many projects probably already have a working:

https://socket.io/docs/client-api/

dmonad commented 3 years ago

Socket.io doesn't provide a service like that. It is simply an overbloated library for connecting through websockets. Socket.io is obsolete in my opinion. It was cool 10 years ago when Websockets were unsupported in many browsers. The only thing that it got going for it is that many people are used to the API. But socket.io has a lot of overhead (the bundle size is huuuuuge - way bigger than Yjs). Another "feature" of socket.io is that it has different fallbacks if WebSockets are not supported. If you can do WebRTC in your browser, you don't need a fallback to HTTP long polling. WebSockets are ubiquitous nowadays. If you expect your users not to support WebSockets, then you shouldn't use WebRTC anyway.

So no, I won't support socket.io.