hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aurelien Pernoud" <apern...@sopragroup.com>
Subject Moving to 2.0a2
Date Fri, 07 Feb 2003 09:54:51 GMT

Hi there, I'm finally beginning the big one (well in fact It doesn't seem
that long but one never knows !) for my project, moving from a nightly
(around may/02) to the 2.0a2.

I'd like your advice before starting it.
I'm using httpclient to get two distant servers communicate for my clients.

I was using a global httpclient that was handling request for every clients
(every request goes to same host), every client giving its state and its
method to execute. This gloal client was a rewrite of HttpMultiClient, to
allow using more connections than 2 per host (in my case, both servers are
intranet, and for this use only :)).
On my server A, when people log in, I give them a state they use to
"discuss" with server B. Then they ask the global httpclient to execute the
request, to be sure not to use too many connections at a time and get the
server B down.

So now that I'm looking the new httpclient, it seems this "hack" is not
necessary anymore. Here's how I see it :

- People log in on server A, I give them a personal State to discuss with
server B
- I'll use one global shared MultiThreadedConnectionManager for my project
for every clients on server A, and increasing it's maxconnectionsperhost.
- Each time I have a request to execute :
* I ask for a connection using the shared MultiThreadedConnectionManager
* I execute the method : method.execute(state of user, connection from
* I don't have to release the connection, it's done (as far as I went into
the code, now a connection is associated to a manager, and call the
releaseconnection on it).

And it should work perfectly, whithout any hack to use more connections than
allowed !

Am I missing something, or is the way I see it the right way to use
httpclient (and the more evolutive of course) ?

Thx for your work and help, HttpClient is just perfect for my needs, and as
I saw it's performance were improved again (TCP_nodelay stuff), I want to
try the new one :)

Aurélien Pernoud

View raw message