On 05/10/2011 08:00 PM, Charles Oliver Nutter wrote:
Of course the other side of the coin is that V8 was made for the
> client from the ground up, and the Node.js event loop actually does
> not behave that well under high concurrency (not even for the use case
> it is supposedly written for), so Java usually beats Node handsomely
> in server benchmarks, even with Rhino involved.
>
> http://amix.dk/blog/post/19577
> http://hns.github.com/2010/09/29/benchmark2.html
Very cool. Yeah, I really just want to see the node.js stuff available
for JS on JVM, since really the piece that node.js does well is making
event-driven request processing really nice. That's easy to mimic.
> In the end, it's true what somebody wrote on twitter today: The Node
> hype is not so much about performance. Or maybe it's more about
> perceived speed and leanness than measurable performance. It just has
> that "lifestyle" aspect to it I guess.
That's probably true, but I think we've managed to bring Ruby users a
similar-feeling "lifestyle" with JRuby. It's a damned hard thing to
do, but it is possible to make the JVM feel like a friendly tool for
small servers, client-side apps, and even for CLI use if you work hard
enough. And we've worked pretty hard to make the JRuby experience feel
the same as the Ruby experience, despite the JVM resisting our efforts
:)
I think it's totally possible to make a JS/Node-like environment on
JVM feel as lean, fast, and hipster-cool as V8 + node.js.
The question at 1 dollar is why do you want to create another node.js
knowing that:
- We all know that a web server must mix threads and non-blocking
io/async io
to be effective. So all the benefits of being single threaded goes away.
- Trying to manage exceptions in an async handler is a nighmare
- Not controlling the server event loop makes things like closing too
slow connections (DDos)
very difficult (remember Swing is suffering the same kind of illness
compared to SWT).
In my opinion, node.js is not a good API because it's too dogmatic
(async API will save our soul)
but at least we now have a common JavaScript API on server.
BTW, I strongly believe that one of the main benefit of coroutine is to
allow users
to use synchronous like API on top of asynchronous io.
- Charlie
Rémi
--
You received this message because you are subscribed to the Google Groups "JVM
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jvm-languages?hl=en.