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

Is JavaScript able to to parse arbitrary URLs the same way the current URL is parsed in windows.location?

javascript jquery uri url-parsing

I like that the current address is nicely split up into sections in window.location, but I would like to be able to take an arbitrary URL and split it up following the exact same logic. I don't kno...

Finding which array contributes the maximum value for classification

python numpy

Given 2 2x2 Numpy arrays, each element having a value between 0 and 1, I would like to find the one array of the 2 that has the maximum value, and do that comparison element-wise. For example, give...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.