Vert.x is an asynchronous event-driven
platform (paradigm where the program
flow is determinate by events like user actions) where is possible creating web
applications.
It processes all I/O using Netty. Therefore, it is meaningless to
verify differences of the performance between Vert.x and 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 I/O and Vert.x
can process the higher-level I/O than Netty.
Vert.x is similar the Node.js and Akka, run in the JVM, is scalable,
concurrent, non-blocking, distributed and polyglot.
- Each component is called verticle.
- Vertx can scale when create more instances of verticle.
- Vert.x treats its verticle as an 'actor' of the Actor model.
- Each verticle runs simultaneously on a separate thread single.
- There is no state that is being shared between the Verticle.
- Uses Event-bus as the Vert.x core.
All communication between Verticle happens through Event-Bus.
Verticle can publish or listen event in an address on event-bus
The Vert.x Event-Bus supports point-to-point, pub-sub, and
request-response messages.
The numbers of event-loops are created by default with the number of
CPU core.
If a verticle's event-handler for example has some I/O operations
heavy, it may take time until
If the event-handler verticle has, for example, some I / O heavy
implemented that may take some time to complete, it will block the event-loop.
All event messages will not be delivered to
other verticle operating in the same event-Loop to the previous handler was
completed
A single event loop serving a high volume of connections via an
asynchronous programing model.
Most of the real work is done in a pool of background threads.
Vert.x does not block 100 concurrent long running requests.
- TCP/SSL clients and servers
- HTTP/HTTPS clients and servers including Web Sockets
- Event Bus
- File System
- 100% asynchronous
A general-purpose application framework running
in JVM
Very performative, asynchronous APIs,
event-driven, on-blocking (asynchronous I/O is a form of input/output
processing that permits other processing to continue before the transmission
has finished.)
Highly scalable but also easy to implement
concurrency.
Polyglot, are possible use Java,JS, Ruby,
Groovy, Python, Scalam Clojure and Ceylon.
Use all available cores on a single machine
A verticle never gets executed by more than one
thread concurrently.
No race conditions, no deadlock. You write your
code as single threaded.
- Real-time Analytics dashboard
- Big data queries and task coordination
Vert.x Vs NodeJS
Polyglot - JS
JVM
- V8
Huge ecosystem of Java Libraries - big
ecosystem of node modules
Small community - big community
-----------------
References:
Nenhum comentário:
Postar um comentário
Observação: somente um membro deste blog pode postar um comentário.