4 ms·
Is v4 ready for general use? Or should we continue using v0.12? (The main concern is compatibility with all the popular libraries in npm, the Node.js package ec
by applecore 11y ago
Is v4 ready for general use? Or should we continue using v0.12? (The main concern is compatibility with all the popular libraries in npm, the Node.js package ecosystem.)
- cvburgess 11y agoA lot of libraries have been following the iojs track (v1, v2, v3) so many libraries are already in place to support v4 out of the box. The best way to know though is test your specific packages in a dev branch or sandbox environment and see what breaks - tests help automate this if you have them!
- mb22 11y agowebpack-dev certainly does not work.
- chisleu 11y agosocket.io is a big deal, and it breaks on 4.0. I've not tried 4.1
- yid 11y agoConsider using Primus [1] instead of socket.io, backed with either ws or sockjs. [1] https://github.com/primus/primus https://github.com/primus/primus
- angersock 11y agoIf possible, consider leaving socket.io. If you can, check out https://github.com/websockets/ws https://github.com/websockets/ws .
- tracker1 11y agoDoesn't seem to have a fallback mechanism, which is pretty important considering the number of users behind proxies that don't support web sockets... of course this depends on your user base.
- chisleu 11y agoNever heard of it. Thanks! I'll take a look at this. I only recently started using socket.io in my express site, so I'm not too deep down the rabbit hole. It seems to have close to the same syntax. Any reason why you support ws over socket.io?
- angersock 11y agoSocket.io is kinda big, the documentation is not great, there's a lot of baggage there from it's history, etc. ws is faster, and most browsers now support web sockets properly. If you want some isolation, there are various shim layers that are available.
- nilliams 11y agosocket.io and ws are apples to oranges. ws does not provide hand-shaking, retries or fallbacks. These are important things if you're building a production app.