{ vertx run vertcle1.groovy}
{container.deployVerticle("verticle1.groovy"}
What happens in the background when these two statements are executed?
A verticle is the fundamental processing unit in Vert. x. The role of a verticle is to encapsulate a technical functional unit for processing events such as exposing an HTTP API and responding to requests, providing a repository interface on top of a database, or issuing requests to a third-party system.
A Vert. x instance maintains N event loop threads (where N by default is core*2) by default. If you wanted to utilize all of your cores, you would deploy 2 verticles per core.
As the headline on the Vert. 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.
1st command runs another JVM
2nd loads verticle in a separate classloader but inside current vertx process
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With