English 中文(简体)
Comparison among NIO webservers [closed]
原标题:

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.

最佳回答

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?).
问题回答

There is no reason why the authentication and the content serving need be the same technology. You can auth and bill on any technology you like and then serve the content out of a CDN that supports non public content (Akamai, Cloudfront, or a custom auth/delivery architecture).

The two halves of the requirements have very different usage potentially, and different design requirements.

I would wote for node.js as it s very fast and very easy to use. Or you could look into writing C code against libevent... But from the list above I d really recommend node.js

from a private email of Gabriele Lana (good friend and exceptional developer).


my order would be:

  1. node.js - keyword is being pragmatic here. I just finished a small project with node.js+redis done in 14 days and it s working like a charm.
  2. erlang - keyword is performance stability here. If erlang cannot do it probably it s an impossible task. Learning curve is steep but results are fantastic.
  3. lift - last because I don t think your project need complex domanin logic (in that case I d choose scala).




相关问题
Comparison among NIO webservers [closed]

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 ...

yaws and erlang beam files in ebin

I am having problems when i have integers and float numbers in my form posts and receive these in my ebin file where i have beam files. Hope someone can help me. npower.yaws <erl> kv(K,L) -...

How to set up yaws-1.89 in ubuntu?

I need help with setting up yaws-1.89 in ubuntu. This is the error I get: =INFO REPORT==== 3-Dec-2010::16:52:40 === Yaws: Using config file /home/hudson2010/yaws.conf =ERROR REPORT==== 3-Dec-2010::...

Yaws and PUT requests

I just started working with Yaws to try to create some simple RESTful web services, however I ran into an unexpected issue: I can t seem to access my data when I do a PUT request. When I try to use ...

Erlang s maximum number of simultaneous open ports?

Does the erlang TCP/IP library have some limitations? I ve done some searching but can t find any definitive answers. I have set the ERL_MAX_PORTS environment variable to 12000 and configured Yaws to ...

How do I disable debug checks in yaws?

When i start yaws (yaws -i --conf config/yaws.conf) i get this line in the output: Running with debug checks turned on (slower server) It depends on the "-i" option? Or where did i turned on debug ...

Mochiweb : Reading a file as it is uploaded

I want to be able to read a file just as it is being uploaded by the user, i.e. I want to read the incoming stream of bytes from the user s browser.. Is that possible with Mochiweb? If not, where do I ...

热门标签