I am new to vert.x. I'm not looking for code snippets/examples as the vert.x github page is full of them.
I'm looking for some facts and best practices.
I am coding an application that its main verticle is a HttpServer which handles Restful requests.
I package the application using maven shade plugin as it is describe here: http://vertx.io/blog/my-first-vert-x-3-application/
<manifestEntries>
<Main-Class>io.vertx.core.Starter</Main-Class>
<Main-Verticle>io.vertx.blog.first.MyFirstVerticle</Main-Verticle>
</manifestEntries>
First question:
Is there any difference between different ways to run the app:
- Run using java -jar app-fat.jar
- vertx run MyApp.java
- Any other way... ?
Second question:
As the number of users requests goes high, do I need to do anything or vert.x will scale and create more instances of my HttpServer verticle?
Third question:
Let say one of my REST handlers delegates its task to another verticle, for example a verticle that does database related tasks. How should I deploy that verticle? from maven? from the HttpServer verticle? Which way is the best practice?