June 24, 2013

Vert.x, Node.js and some reflections on performance

Four years ago Node.js was invented. It's a server-side framework with an asynchronous, event-driven programming model with non-blocking I/O using Javascript. It has become very popular in the web community since you can use Javascript and the same async programming model both on the client and server. Node.js is using the V8 Javascript VM, which has had an incredible performance since its' start (see my earlier post).

Vert.x is an alternative to Node.js that runs on the JVM. It supports the same programming model but for any JVM language (the "x" is for any language). Currently it supports Java, Groovy, Ruby, Python and Javascript, with Scala and Clojure on the roadmap. Earlier this year the Vert.x community chose the Eclipse Foundation to be its vendor-neutral home. The Eclipse Foundation changed policies so that the project could continue being hosted on GitHub, which was not possible before Vert.x came along.


Regarding the performance of Vert.x compared to Node.js, it has been shown to be faster in some benchmarks here and here.

Benchmark result from "Inside Vert.x. Comparison with Node.js"

Given that the JVM is 18 years old compared to V8's five years, it may not be so surprising. More interesting is that the original V8 designers in their Google I/O 2013 talk show that getting predictable performance for a highly dynamic language like Javascript is problematic. That's the reason why they are now working on the Dart language and VM which is already twice as fast as Javascript in some benchmarks