Wednesday 29 November 2017

Starting out with WebSockets - How to realize rooms?

I'm coding a website with a Node/Express backend and Vue frontend, and now I need Websockets and I don't have any experience with that. I've been googling the last two days and I almost made no progress, so many options!I've seen ws being recommended tons of times, especially more recently, while socket.io seems to be a bit bloated, and fallbacks are not needed as much anymore, with standard ws being more and more supported.I'd gladly go with WS, but sadly, it doesn't look like it has rooms/channels/broadcasts. Is there a way to recreate this? I've also seen socketcluster.io recommended, but that seems to be a pain to add in an existing project and slightly overkill already. Another question would be: If you use WS, do you use any WS modules on the frontend to make your life easier, or is the native WS good enough for sending stuff back and forth?tl;dr: websockets module for a noob with good docu and rooms/channels? Thanks!

Submitted November 29, 2017 at 10:34PM by zonq

No comments:

Post a Comment