HI Tim,
its the same use case for which vertx-3 now has executeBlocking. You need to intersperse blocking and non-blocking code. In vertx2, you do this in a worker verticle and this has some advantages as well ...
we typically do everything in worker verticles and standard verticles are essentially just doing http routing to business logic on the opposite end of an event bus call. This is great, as it enables us to distribute work across many processes. In our worker verticles, we inject spring beans, make blocking calls, do some http GETS, POSTS, etc, do some more blocking calls (call db, do calculation), and return back over the eventbus. We've standardized this approach to the point where we have a base class developers just extend, inject spring code and do their thing. we can also size worker vertical thread pools, and associate some classes exclusively to some pools/verticle-instances, and and such we can can isolate/size certain logic - that is we can give our "auth" code 2 threads and "BusinessLogic" 10 threads/verticle-instances, lets say, because that allows better usage of the db. as far as i can see, you cannot size executeBlocking or have different thread pools (worker verticles) for different things.
we use vertx httpclient as our httpclient so everything plays well with vertx...i.e. we don't want to use apache httpclient to make http calls when the vertx client works well.
i could convert all worker vertices to standard verticles and then wrap all blocking code in executeBlocking ... but now i am not only wrapping http calls with callbacks, but basically everything else as well. Thats a whole nother later of callbacks which is not needed if you are already in a worker vertical.
Thanks!
ps my mac is trying to autocorrect "verticle" to "vertices"...uhg..