I'm at the start of a project to build a real time chat application spanning accross a website and an Android app. Since I want to prevent continuous polling on all sorts of API calls, I want to use websockets (which I have no experience with) and in the process, I thought it would be a good idea to learn node.js. So I need to start using a websockets lib for node.js. For this I see there is quite a list of options. The thing I read most about is socket.io.
Around SO I also read that socket.io v0.9 was pretty buggy, and I see multiple references about engine.io being the new backend of socket.io from socket.io version 1.0 which is supposedly "right around the corner". All these messages are from 2012 though (this one for example), and when I have a look at the socket.io website, I see they are still at v0.9, which makes me wonder a couple things:
All tips are welcome!
is socket.io still actively being developed?
https://github.com/learnboost/socket.io
master: authored 7 hours ago
So it's really in development now.
is socket.io a viable option at all, or do I need to reside to another library?
We are using socket.io in several projects and it is OK. Maybe you should tune your heartbeat values. For us this are:
app.io = io.listen(app);
logger.info('Setting up basic configuration.');
app.io.set('heartbeat timeout', 50);
app.io.set('heartbeat interval', 20);
app.io.set('browser client minification', true);
app.io.set('store', new io.RedisStore(ioStoreSettings)); // also don't use in-memory store, it is hardly not recommended
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With