What is the difference between Vert.x and Netty?

What is the difference between Vert.x and Netty? Why should one ever prefer Netty over Vert.x?

Both of these are event-driven, non-blocking, and asynchronous frameworks designed for high performance I / O operations.

Vert.x is based on the Multi-Reactor pattern (Node style event loop on a multithreaded JVM), but Netty uses the hook chain pattern. When is the Interceptor Chain Pattern any advantage over the Multi-Reactor Pattern?

I'll just take a quick look at the Netty documentation, but it looks like Vert.x has some additional functionality over Netty. That is, Vertx is a standalone server, it is a polyglot, it provides HA and clustering out of the box.

Also Vert.x has slightly better benchmarks than Netty.

PS Disclaimer - I really appreciate Vert.x and am not familiar with Netty. So by asking Why should one ever prefer Netty over Vert.x?

, I'm just trying to compare both of them.

+3


source to share


1 answer


The difference is that Vert.x is based on Netty. If you look at pom.xml

in vertx-core you will find:

<!-- We depend on the specific Netty dependencies not netty-all to reduce the size of fatjars -->
<dependency>
  <groupId>io.netty</groupId>
  <artifactId>netty-common</artifactId>
  <version>${netty.version}</version>
</dependency>
<dependency>
  <groupId>io.netty</groupId>
  <artifactId>netty-buffer</artifactId>
  <version>${netty.version}</version>
</dependency>
<dependency>
  <groupId>io.netty</groupId>
  <artifactId>netty-transport</artifactId>
  <version>${netty.version}</version>
</dependency>
<dependency>
  <groupId>io.netty</groupId>
  <artifactId>netty-handler</artifactId>
  <version>${netty.version}</version>
</dependency>
<dependency>
  <groupId>io.netty</groupId>
  <artifactId>netty-handler-proxy</artifactId>
  <version>${netty.version}</version>
</dependency>
<dependency>
  <groupId>io.netty</groupId>
  <artifactId>netty-codec-http</artifactId>
  <version>${netty.version}</version>
</dependency>
<dependency>
  <groupId>io.netty</groupId>
  <artifactId>netty-codec-http2</artifactId>
  <version>${netty.version}</version>
</dependency>
<dependency>
  <groupId>io.netty</groupId>
  <artifactId>netty-resolver</artifactId>
  <version>${netty.version}</version>
</dependency>
<dependency>
  <groupId>io.netty</groupId>
  <artifactId>netty-resolver-dns</artifactId>
  <version>${netty.version}</version>
</dependency>
<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-core</artifactId>
  <version>${jackson.version}</version>
</dependency>

      



And Netty version for Vert.x 3.5.0-SNAPSHOT

:4.1.8.Final

Vert.x is a whole set of tools and ecosystems of plug-ins on top of Netty for building reactive applications on top of the JVM.

+13


source







All Articles