You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Eric Cantonna <pe...@hotmail.com> on 2008/02/28 10:24:35 UTC

Multi-Threading using different host configurations

Hello everyone,

This is my first message on the mailing list (but searches in the archives have already helped me alot).
I'm coding some kind of data miner which works rather well now so i'm entering the optimisation phase.

I find the example and documentation on the multi-threading a bit sketchy. 
What is the best way to proceed if I want some threads to be associated with  requests for different sites (let's say one thread per site to fix the mind) and I don't want to use absolute URIs for each Method instance. 

I gather I have to use different HostConfiguration instances for this? 
Should/Can I also use different HttpClient instances?
Should/Can I use different MultiThreadedHttpConnectionManager instances?

I gather I could test the different possibilities and see for myself what works and what doesn't but I thought maybe I could avoid that trouble and ask away...


Thanks,

_________________________________________________________________
Microsoft vous recommande de mettre à jour Internet Explorer.
http://specials.fr.msn.com/IE7P25
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Multi-Threading using different host configurations

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2008-02-28 at 09:24 +0000, Eric Cantonna wrote:
> Hello everyone,
> 
> This is my first message on the mailing list (but searches in the archives have already helped me alot).
> I'm coding some kind of data miner which works rather well now so i'm entering the optimisation phase.
> 
> I find the example and documentation on the multi-threading a bit sketchy. 
> What is the best way to proceed if I want some threads to be associated with  requests for different sites (let's say one thread per site to fix the mind) and I don't want to use absolute URIs for each Method instance. 
> 
> I gather I have to use different HostConfiguration instances for this? 

Yes. You should also be using a separate HttpState instance per thread
of execution.

> Should/Can I also use different HttpClient instances?

No/Yes

> Should/Can I use different MultiThreadedHttpConnectionManager instances?
> 

No/No

Oleg

> I gather I could test the different possibilities and see for myself what works and what doesn't but I thought maybe I could avoid that trouble and ask away...
> 
> 
> Thanks,
> 
> _________________________________________________________________
> Microsoft vous recommande de mettre à jour Internet Explorer.
> http://specials.fr.msn.com/IE7P25
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org