Node.js vs Java for Comet application [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Answer:1

I know this is an old and already answered question but I think my experience can be helpful.

I started a little pet project to test Node.js - how it "feels" and how to program on it. I became impressed by the ease of working in such ecosystem: Node.js code is easy to write (although its asynchronous paradigm is not that straightforward for the conventional programmer), libraries are easy to build etc. etc. Even npm is amazingly easy: I just found the most straightforward way to provide code of your own as a library is to make a public package of it!

However, there is not much good tools to work with Node.js. Maybe because it is too easy to do anything, most libraries are partially-implemented, undocumented solutions (and I am guilty too).

Also, note that the relevant difference of Node.js is not the JavaScript language, but the asynchronous I/O model. It is the most interesting aspect of Node.js, but the asynchronous programming style is not as well tested as the conventional way of web development. Maybe it is really the marvel that is propagandized - or perhaps, it is not as good as promised.

Even in the case it pays off, will you have enough developers to maintain such an (at least still) unusual codebase? If you can get a lot of advantages from the asynchronous "way of life" of Node.js, you can use more consolidated languages and frameworks, such as Twisted for Python (which is my preferred languabe, so take care with my opinion :) ). There may be something like this for Java, too. Anyway, I suspect that you do not have a lot of interest in this model for now, since your question focuses more on languages than in the programming paradigm, so Node.js does not have much to offer to you anyway.

So... no, I would not develop something professonaly in Node.js for now, although I think it is both fun and instructive to study.

Answer:2

In my opinion the asynchronous approach for Comet glorified in Node.JS and Grizzly is deeply flawed.

Answer:3

I am currently working on creating a small framework using the executor and completion services to concurrently execute multiple tasks at the same time. I have another thread that runs independently ...

I need to implement a class in java where its field needs to be set only once, but it's value is not known at field declaration. To do so I have: public class MyClass { private String field1 = ...

I have a simple executable Jar file. How I can set icon for this file? In my case I use the standard Jar icon which I would like to change.

Is there a compiler optimization for the size() methods of Collections in Java? Consider the following code: for(int i=0;i<list.size();i++) ...some operation..... There is a call to ...