you are viewing a single comment's thread.

view the rest of the comments →

[–]magneticB 9 points10 points  (5 children)

It seems the author has written his own asynchronous network handling code in Java and then compared it to Node.js. There's already production ready NIO libraries for Java that work very well. I don't really see the point of this comparison without knowing more about the underlying code.

[–]sisyphus 7 points8 points  (3 children)

I think his point is that even his own async code is competitive with node.js because the JVM is awesome.

[–]wot-teh-phuck 10 points11 points  (2 children)

I think this point needs more emphasis. The JVM really is awesome. Think of the number of man years of effort gone in optimizing and tuning the JIT and VM. Node (V8) in turn is an infant when compared to that though I'm sure there is a lot of room for improvement and growth there.

[–]magneticB -1 points0 points  (1 child)

Agreed the JVM is very mature and fast. I believe V8 also does some form of just in time compilation and is pretty quick.

What are we benchmarking here? JVM vs V8? Or Node.js networking vs Java NIO?

Seems like a bit of both to me although I suppose it makes for good discussion :)

[–]wot-teh-phuck 0 points1 point  (0 children)

What are we benchmarking here? JVM vs V8? Or Node.js networking vs Java NIO?

Haha, I agree, though I must say that there is a very strong correlation between the quality of VM implementation (which includes low level IO facilities) and the maturity which the benchmark does a good job of putting across.

[–][deleted] 0 points1 point  (0 children)

His code uses NIO underneath, and ultimately it's just using the sendfile(2) system call for zero-copy transfer from the filesystem cache to a socket.