This version (2017/05/27 13:44) is a draft.
Approvals: 0/1

[08:46:29] * ChanServ sets mode: +o temporalfox [12:17:08] * ChanServ sets mode: +o temporalfox

[12:43:54] * ChanServ sets mode: +o temporalfox [14:33:33] * ChanServ sets mode: +o temporalfox

[15:42:09] <Alex> Hello, can anyone help me. Does code 1 and 2 do exactly same things? 1) vertx.deployVerticle(Verticle.class.getName(), new DeploymentOptions().setInstances(8)); 2) for(int i = 0; i < 8; i++) { Verticle verticle = new Verticle(); vertx.deployVerticle(verticle, new DeploymentOptions()); }

[15:59:47] * ChanServ sets mode: +o temporalfox [16:02:38] <skullcrasher> Alex, afaik a difference might be that 1) will return one deploymentId for all deployed Verticles and 2) can return a deploymentId for every verticle deployed seprateley (if u save it in your loop ofc). So with 2 you can undeploy each verticle on it's own, with 1 only all or none. [16:03:14] <skullcrasher> but maybe someone here can prove me wrong :) [16:05:47] <Alex> @skullcrasher, thank you! [16:39:33] * ChanServ sets mode: +o temporal_

[16:49:17] <temporal_> Alex the other difference is that with the 1) you are sure to have 8 different threads (given you have the proper number of corse) and with 2) you will not

[16:49:34] <temporal_> with 2 you might get the same thread in two verticle instances

[16:52:55] <Alex> @temporal_ Wow! Thanks, i don't know that. So what is the proper way to deploy multiple instances of verticle using constructor?

[16:53:23] <temporal_> Alex ideally we should have something like deploy(Supplier<Verticle>)

[16:54:37] <temporal_> Alex you could use a verticle class that is passed a reference

[16:54:53] <temporal_> and put in a static hashmap the verticle with that reference String

[16:55:10] <temporal_> that would work although it's a work around

[16:57:06] <Alex> @temporal_, Thank you, I will try that approach.

[17:09:06] * ChanServ sets mode: +o temporalfox [22:27:22] * ChanServ sets mode: +o temporalfox

[22:29:21] * ChanServ sets mode: +o temporalfox [22:34:59] * ChanServ sets mode: +o temporal_

[23:01:37] *** ChanServ sets mode: +o temporalfox