Search code examples
node.jsnioliftyaws

Comparison among NIO webservers


We need to put in our architecture a server for streaming contents to (potentially) millions of phones.

Here the architects and operations people know only about Java, but I'd really to propose something faster and easier to maintain.

My list of candidates currently is: Lift, Node.js, Yaws.

The server should serve static content (videos, games, xml descriptions) after authenticating user credentials and charging the user. So a nosql db (couchdb or mongodb) will be used as well.

No need to produce dynamic content or html.

The pure speed is important but not the only parameter, also operational ease to use is important.

From a development point of view I really like all 3 in their own way.

  1. All other things being equal Lift would be my first choice because of compatibility between Scala and Java.
  2. Second one is node.js because everybody understand Javascript.
  3. Erlang is a bit hard to learn and teach, so Yaws would be my last choice, although I personally like it.

So the question is: in your experience, what would you recommend me? Could be also another one.


Solution

  • difficult comparision because of your requirements, but I like node better. But then again for your requirements maybe java is a better fit.

    The server should serve static content (videos, games, xml descriptions) after authenticating user credentials and charging the user. So a nosql db (couchdb or mongodb) will be used as well.

    node.js is/was(3.x solves this better) not so good at handling large requests => Watch this roadmap talk from ryan dahls about large requests problem(35:36 and onwards you see a diagram which is unacceptable, both is being solved in 3.x).

    Can only compare node vs java, because I don't have any experience with erlang.

    • npm vs maven => npm much nicer.
    • some very nice libraries in node.js and a lot created all the time at github.com. To name some: express, socket.io, npm, node_redis
    • very fast prototyping in node.js.
    • People should learn to use javascript anyway if webprogrogramming.
    • IDE for java are much better, but you need to type much less in node.js. You could even reduce your typing by using coffeescript(maybe zappa). For example I also like the Junit integration in netbeans vs node.js unit testing support in IDE(non existing?).