-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements #93 - Generic Vert.x future support #94
Conversation
@radoslawtwardy can you give me an example of the async io code you're using? I'd like something more concrete to use in my tests for this. |
So as I said i tried to wrote own ParallelEoSStreamProcessor (which inside call async-htpp-client and some other thinks), but also i tried to use VertxParallelStreamProcessor, so maybe so example with it:
This cause that i has 10000 threads ! I can show you own implementation of ParallelEoSStreamProcessor (which has same problem) - but i wrote it in scala (i'm scala developer) |
I've written some very simple code in Java - using ParallelEoSStreamProcessor to show you intention:
Of course using future is much better and elegant, but I think simplicity of this code show my case. I want delegate main work to custom thread pool which is designed for some kind of IO operations. It can be not only one thread pool (maybe few). |
I don't understand - this PR adds future support for generic async functions to the vert.x module, which uses a small number of threads. Is your fork published so I can see it? I am also a "Scala developer"? doesn't seem to be on this list: https://github.com/confluentinc/parallel-consumer/network/members. You don't need to reimplement thread pools or a custom ParallelEoSStreamProcessor in order to use generic async operations - the vert.x module already does that for you (with this PR). It uses a thread pool by default of the number of cores as you've shown.
You also don't need a custom implementation just to have async http requests - the vert.x http functions are already available in the vert.x module.
Are you saying that when you tried the http client in the vert.x module, you got 10,000 threads? That shouldn't happen, and if it did, please open an issue as it's a bug. You should get roughly the same number of threads as you have cores, unless it's overridden.
Also if you could show some examples of the complex IO operations you're doing and the libraries used and what they return in the function that would really help as well. |
As you suggested i create issue #97 |
Together with #98 this seems nice for me. Thanks! |
5c841c3
to
bc85ba3
Compare
hey! this is pretty interesting. sorry for being annoying, but are there any plans to finish this PR ? |
Yes. This is now supported in the Reactor module ( #116 ). The fixes for that, will enable this with Vert.x I think. |
4da5bc4
to
291d61f
Compare
433241f
to
4758247
Compare
fixes #93