Asynchronous Event-driven Network Application Framework:vert.x, Node.js or Netty

Let’s have a look these three frameworks,

Vert.x is an event driven application framework that runs on the JVM – a run-time with real concurrency and unrivalled performance. Vert.x then exposes the API in Ruby, Java, Groovy, JavaScript and Python. So you choose what language you want to use. Scala and Clojure support is on the roadmap too.

Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

Netty is an asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients.

And here are some useful comparison articles,

  • Vert.x: Why the JVM May Put Node.js on the Ropes
  • Vert.x
    (Polyglot JVM)
    Node.js
    (Javascript)
    Netty
    (Java)
    EventMachine
    (Ruby)
    Twisted
    (Python)
    LibEvent
    (C)
    Language Type Dynamic or Static Dynamic Static Dynamic Dynamic Static
    Speed of Development Fast Fast Slow Fast Fast Slow
    Synchronous Threading Support Great None Great Poor Poor Good
    Library Threadsafety Good N/A Good Poor Poor Good
    Backed By VMware Joyent Redhat N/A N/A N/A
  • Vert.x vs node.js simple HTTP benchmarks
    1. Vert.x is much faster than Node.js when reading the same file from the filesystem more than once. Neither Vert.x nor the JVM is doing any explicit caching, so this is most likely due to the OS caching it (memory mapped files?). In a webserver-type app the same file is likely to be served many times so this is pretty significant
    2. Node.js doesn’t appear to scale particularly well using the cluster module. The advice from the node.js folks is not to use it (for now). This leaves node with no out-of-the-box way to scale across multiple cores :(
    3. Many of the out of the box load testing tools don’t appear to pipeline very much. The Vert.x results are dramatically better when there’s a high degree of pipelining going on.
    4. Java on the JVM is extremely fast. No surprises there ;) But what is very encouraging is how the other JVM langs held up – in particular Rhino held up very well against V8 :)

Leave a Reply