-
Notifications
You must be signed in to change notification settings - Fork 341
Abstract the ws package so we can change it (to use uws instead of ws for example) #67
Comments
I think this should be another module instead let's keep a package for |
hi @kesne, |
It might be worth considering, but we should also keep in mind that ws has about 200x as many downloads on npm and many more production users, and is thus a somewhat safer choice for now. @kesne Are you anticipating or seeing bottlenecks with ws? |
I haven't seen bottlenecks with |
@kesne thanks! |
forget my previous message.. |
Looks like uws doesn't have Hapi support which would be a show stopper for us: |
Isn't there a way to use optionalDependencies in the package.json to detect uws's existence and then use that instead? That's what socket.io does. |
There are a lot of changes in the recent version, and it might be interesting to revisit this with the current |
Would be great to have |
hmmmm that's interesting. |
If |
@sergiodxa I'm not sure it is, would be great for someone to try and figure it out |
Doesn't look like |
From what I understand that issue is related to the Node's core HTTP module experimental alternative which can be used by The author stated in the new
That said, I'm using The differences from Apart Socket.io/Engine.io at least also Parse-Server, SocketCluster, DeepStream.io and Primus use it. Hope it helps. |
Discord also uses it. |
+1 |
+1 |
They seem compatible enough that this is all the handling Engine.IO needs: /~https://github.com/socketio/engine.io/blob/b1fa020675d905905b6f07d0a6b5acff775c4be5/lib/server.js#L105-L116 Given socketio/engine.io#550, perhaps uws is not a good default, but it seems easy to make it configurable. |
Seems like just dropping in |
Would be great to use uWebSockets.js instead ws |
what about /~https://github.com/HenningM/express-ws? That allows using the same port for websockets as for regular traffic. It's for express of course, but it would be nice to be able to use it somehow |
I noticed you just recently switched to ws, and I was wondering if it might make sense to switch to
uws
, which has better performance.A while ago I forked this module here to switch the websocket library to uws: /~https://github.com/kesne/subscriptions-transport-uws
Here's a quick post that features a quick overview of the performance benefits of using uws:
https://hackernoon.com/%C2%B5ws-as-your-next-websocket-library-d34209686357#.v5vyqggwq
The text was updated successfully, but these errors were encountered: