Nowjs vs Socket.io

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?

Answers


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


Need Your Help

Dynamically added JTable not displaying

java swing netbeans jtable

Java Newbie here. I have a JFrame that I added to my netbeans project, and I've added the following method to it, which creates a JTable. Problem is, for some reason when I call this method, the JT...

Ruby "is" equivalent

python ruby

Is there a Ruby equivalent for Python's "is"? It tests whether two objects are identical (i.e. have the same memory location).