Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between running a vertx verticle and deploying a verticle through another verticle container?

Tags:

vert.x

{ vertx run vertcle1.groovy}

{container.deployVerticle("verticle1.groovy"}

What happens in the background when these two statements are executed?

like image 626
Nithin Avatar asked Oct 07 '14 09:10

Nithin


People also ask

What is a Vertx verticle?

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.

How many Verticles do you need to deploy Vertx?

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.

What is the use of Vertx?

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.


1 Answers

1st command runs another JVM

2nd loads verticle in a separate classloader but inside current vertx process

like image 125
jozh Avatar answered Sep 30 '22 04:09

jozh