I've been using socket.io with node.js and came across Nowjs, it seems this just wraps socket.io and provides a more user-friendly interface.
Once thing I've noticed with Socket.io is sometimes there is a delay in connection, in IE and Firefox in particular, it can sometimes take 2-4 seconds before a 'connection' is established.
Does anyone know if there are any performance benefits or additional benefits in general to using Nowjs vs. Socket.io stand alone?
NowJS supports clientId's and sessions, which would be easier for supporting multi-user real-time app. I think the both are practically the same and if you have some delay with socket.io, I really don't think it will disappear with nowJs.
I've switched to NowJS, because it's easier to structure your application ( for me ). I also experience a delay, but I think it is normal and since everything is async you could manage it in your script.
EDIT 1:
I discovered the cause of the delay. It seems that when NowJS is initialized it executes a lot of code to evaluate your "now" constructor, and synchronize it with the methods added from your server/client. In socket.io you have no such delay and it is faster
Update :
Nowjs is no longer in active development ( there are no recent updates and there probably won't be by the authors ). You should definitely look for something with greater support.
https://github.com/Flotype/now/issues/208
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