开发者

Comparison among NIO webservers [closed]

开发者 https://www.devze.com 2023-01-29 05:30 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. 开发者_如何学JAVA Closed 11 years ago.

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号