Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Fwd: Jetty Client 9.04 threads

Thanks!

So, in your opinion task like parsing HTML (I've implemented something
similar to webcrawler) or calling external services (i've implemented
own redirect logic to check that host in Location header is "safe" -
i.e does not redirect to my internal network - so I am calling DNS
resolver in callback), should have own thread pool?

HttpClient threads are only for tasks like parsing HTTP requests and
other "framework" tasks?
--
Kamil Gorlo


On Tue, Jul 16, 2013 at 9:35 PM, Simone Bordet <sbordet@xxxxxxxxxxx> wrote:
> Hi,
>
> On Mon, Jul 15, 2013 at 6:29 PM, Kamil Gorlo <kgorlo@xxxxxxxxx> wrote:
>> I've forwarded an email with explanation (about selector thread when
>> using SSL). Or maybe you suggesting that everyting is OK?
>>
>> Precisely, I am asking why when using SSL client worker threads are
>> not used at all and all "work" is in selector thread (including
>> possibly heavy callback code)?
>
> So the story is that SslConnection used to dispatch reads, so there
> was no need to dispatch again in HttpClient.
> However, SslConnection has been optimized to not dispatch anymore, but
> the HttpClient code was not changed.
> I'll restore the default to not call setDispatchIO(false) when using SSL.
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=413108
>
> In any case, there is no problem. HttpClient is completely
> asynchronous, so it will never block.
> The usual contract - and I will clarify this in the documentation - is
> that if you need to do "heavy" code in the callbacks you need to
> dispatch yourself.
> HttpClient cannot dispatch callbacks for you because in the normal
> case it will be a performance hit.
>
> Thanks for the heads up.
>
> --
> Simone Bordet
> ----
> http://cometd.org
> http://webtide.com
> http://intalio.com
> Developer advice, training, services and support
> from the Jetty & CometD experts.
> Intalio, the modern way to build business applications.
> _______________________________________________
> jetty-dev mailing list
> jetty-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-dev


Back to the top