Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Vert.x and Netty? [closed]

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

Both of them are event-driven, non-blocking and asynchronous frameworks designed for high-load I/O.

Vert.x is based on Multi-Reactor pattern (Node's style event loop on multithreaded JVM) but Netty use Interceptor Chain Pattern. When Interceptor Chain Pattern has any benefits over Multi-Reactor pattern ?

I just have a quick look at Netty's documentation, but it seems Vert.x has some extra funcitonality over Netty. I.e. Vertx is a standalone server, it's a polyglot, provide HA and clustering out-of-the-box.

Also Vert.x has little bit better benchmarks than Netty.

P.S. Disclaimer - I appreciate Vert.x very much, and not familiar with Netty. So by asking Why should one ever prefer Netty over Vert.x? I just trying to compare both of them.

like image 826
VB_ Avatar asked Jul 20 '17 12:07

VB_


People also ask

Is Vert X based on Netty?

Vert. x uses low level IO library Netty. The application framework includes these features: Polyglot.

What is Vert X Netty?

Vert. x is a server framework that provides API and functions different and independent from Netty, designed with different purpose from Netty. Netty is a framework that can process the low-level IO and Vert. x can process the higher-level IO than Netty.

What is Vert X used for?

x website (vertx.io) says, “Eclipse Vert. x is a toolkit for building reactive applications on the JVM.” It is event-driven, single-threaded, and non-blocking, which means you can handle many concurrent apps with a small number of threads. (If you know how the Node. js event loop works, Vert.

What is Vert X framework?

Vert. x is a polyglot web framework that shares common functionalities among its supported languages Java, Kotlin, Scala, Ruby, and Javascript. Regardless of language, Vert. x operates on the Java Virtual Machine (JVM). Being modular and lightweight, it is geared toward microservices development.


1 Answers

The difference is Vert.x is based on Netty. If you take a peek at the pom.xml in vertx-core you'll 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 the Netty version for Vert.x 3.5.0-SNAPSHOT is: 4.1.8.Final

Vert.x is an entire toolkit and ecosystem of pluggable modules on top of Netty for building reactive applications on top of the JVM.

like image 157
Arnold Schrijver Avatar answered Oct 11 '22 01:10

Arnold Schrijver