Good vert.x resource to understand the architecture?

466 views
Skip to first unread message

Ravi Hasija

unread,
Dec 20, 2017, 1:23:08 PM12/20/17
to vert.x

Hello,

Please forgive me for a noob question. I want to understand: 

a. what is the difference between starting 20 instances of a Verticle vs 20 threads of a Verticle.

b. Also, what's the advantage of having n worker threads when only one can be active at any given point in time?

Can anyone point me to a good resource book/article etc that can help me understand the Vert.x internals / architecture a bit better?

Thanks,
Ravi H

Thomas SEGISMONT

unread,
Dec 20, 2017, 5:51:31 PM12/20/17
to ve...@googlegroups.com
2017-12-20 19:23 GMT+01:00 Ravi Hasija <ravi....@gmail.com>:

Hello,

Please forgive me for a noob question. I want to understand: 

a. what is the difference between starting 20 instances of a Verticle vs 20 threads of a Verticle.

Starting 20 instances of a Verticle is how Vert.x implements the "Multireactor" pattern. See http://vertx.io/docs/vertx-core/java/#_reactor_and_multi_reactor

Not sure what you mean with 20 threads of a Verticle.
 


b. Also, what's the advantage of having n worker threads when only one can be active at any given point in time?

It seems you're talking about worker verticles: http://vertx.io/docs/vertx-core/java/#worker_verticles

Indeed, worker verticle events are handled one after another by the same, or by different worker threads.

But you could have multiple instances of your worker verticle. In this case, worker thread 1 could be handling events in instance A at the same time worker thread 2 is handling events in instance B.
And also thread 3 could be executing some blocking for a standard verticle or used by the JDBC client.

 

Can anyone point me to a good resource book/article etc that can help me understand the Vert.x internals / architecture a bit better?

Have you checked out the Vert.x core manual? http://vertx.io/docs/vertx-core/java/

There's an intro to Vert.x model in the beginning.
 

Thanks,
Ravi H

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/1b44134c-42cc-4e94-bdfe-09b33c4a4da8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Billy Yuan

unread,
Dec 20, 2017, 9:31:25 PM12/20/17
to vert.x
Hi, apart from the really good :) docs in the official web-site, there are also awesome materials in the community.
You can take a look at this
Reply all
Reply to author
Forward
0 new messages