hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <o.kalnichev...@dplanet.ch>
Subject Re: [PATCH] Connection pooling logic does not take protocol into account
Date Thu, 16 Jan 2003 17:20:56 GMT
Makes sense to me. Do you mind leading the charge?

Oleg


On Thu, 2003-01-16 at 17:35, Michael Becke wrote:
> Oleg, Simon,
> 
> I think we may also want to take proxy settings into effect, as these 
> also change the connection.  I think the HostConfiguration contains all 
> of the data needed to uniquely ID a connnection method.
> 
> I would suggest something like the following:
> 
> - change the storage of connection to be on a per HostConfiguration basis
> - change HostConfiguration.equals() to add object comparison on the protocol
> - remove generateKey() from Protocol and instead use Protocol.equals() 
> to test for protocol uniqueness
> - change getConnectionsInUse(String) to 
> getConnectionsInUse(HostConfiguration)
> - change the definition of maxConnectionsPerHost to be more descriptive 
> of how connections are managed
> 
> 
> Mike
> 
> Kalnichevski, Oleg wrote:
> > Mike, I'd appreciate if commented on the changes I have made
> > 
> > Oleg
> > 
> > 
> > -----Original Message-----
> > From: Simon Roberts [mailto:simon.roberts@fifthweb.net]
> > Sent: Thursday, January 16, 2003 6:51 AM
> > To: Commons HttpClient Project
> > Subject: Re: protocol support
> > 
> > 
> > Well, here's a patch that changes the key for the connection pool from
> > 
> >   host + ":" + port
> > 
> > to
> > 
> >   host + ":" + port + "-" + protocol.getSocketFactory().toString()
> > 
> > It's a little ugly, but perhaps better than making all Implementors of
> > Protocol figure out a sensible value themselves.
> > 
> > Let me know if I missed something, Simon
> > 
> > 
> > 
> > ----- Original Message -----
> > From: "Kalnichevski, Oleg" <oleg.kalnichevski@bearingpoint.com>
> > To: "Commons HttpClient Project" <commons-httpclient-dev@jakarta.apache.org>
> > Cc: <simon.roberts@fifthweb.net>
> > Sent: Tuesday, January 14, 2003 5:15 AM
> > Subject: RE: protocol support
> > 
> > 
> > Simon, the patch will be welcome, of course. Just let us know if have time
> > and interest for contributing it. We should also quickly check with Mike,
> > though, to make sure your efforts would not overlap with his
> > Cheers
> > Oleg
> > 
> > -----Original Message-----
> > From: Simon Roberts [mailto:simon.roberts@fifthweb.net]
> > Sent: Friday, January 10, 2003 12:50 PM
> > To: Commons HttpClient Project
> > Subject: Re: protocol support
> > 
> > 
> > Not that it actually works for in the current codebase (for
> > MultiThreadedHttpConnectionManager, for multiple connections to the same
> > host, anyway), as I noted.  I can submit a patch that adds the the Protocol
> > to the key used in the connection pool, if y'like.
> > 
> > 
> > ----- Original Message -----
> > From: "Ortwin Gl├╝ck" <ortwin.glueck@nose.ch>
> > To: "Commons HttpClient Project" <commons-httpclient-dev@jakarta.apache.org>
> > Sent: Friday, January 10, 2003 9:30 PM
> > Subject: Re: protocol support
> > 
> > 
> > 
> >>You can register your own protocols via
> >>Protocol.registerProtocol(String, Protocol). However HttpClient is only
> >>meant to handle http and https. FTP, Gopher and others are not handled
> >>by HttpClient. The main use of registerProtocol method is to register
> >>custom SocketFactories. So you would mostly register protocols like
> >>'https1', 'https2' for different client certificates with SSL.
> > 
> > 
> > 
> > 
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.441 / Virus Database: 247 - Release Date: 9/01/2003
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> > <mailto:commons-httpclient-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:commons-httpclient-dev-help@jakarta.apache.org>
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> > <mailto:commons-httpclient-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:commons-httpclient-dev-help@jakarta.apache.org>
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > --
> > To unsubscribe, e-mail:   <mailto:commons-httpclient-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:commons-httpclient-dev-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:commons-httpclient-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-httpclient-dev-help@jakarta.apache.org>
-- 
Oleg Kalnichevski <o.kalnichevski@dplanet.ch>


Mime
View raw message