Alexander,
Please see my comments below.
Alexander Kleymenov wrote:
Paulex,
I make HttpsURLConnection as a wrapper over the existing
HttpURLConnection
implementation
(due to HTTPs spec:
"Simply use HTTP over TLS
precisely as you would use HTTP over TCP." RFC 2818).
I.e. I do not reimplement HTTP functionality, just reuse it (although
some
minor updates of the base HttpURLConnection implementation should be
made).
So if there will be support for persistent connections in
HttpURLConnection,
HttpsURLConnection will have it too.
I don't catch up, based on above, may I assume that your
HttpsURLConnection implementation is neutral to HttpURLConnection
whatever we have persistent connection support or not? If so, then the
cached socket can be shared between Https and Http, because the SSL
related work is handled over the HttpURLConnection's plain socket. If
not, then the HttpsURLConnection won't automatically share persistent
connections if HttpURLConnection does.
But Http implementation uses plain
sockets, while Https uses SSL sockets. Thus we should use whether 2
different connection pools (one for http, one for https) or indexing of
sockets in the pool should be made by URL with non empty protocol part
(i.e.
"http://some.host/" or "https://some.host/") to distinguish http
connections
from https' ones.
This issue is just what we should discuss here, IIUI, the SSLSocket is
based on plain Socket, too, and it is created by
SSLSocketFactory.createSocket(Socket....), so we have several options here:
1. cache plain socket and ssl socket in different pool by same mechanism
2. cache them in same pool with different index (IMO it has no
significant difference with 1)
3. cache plain socket only, and create ssl socket over them on demand
4. handle ssl issue over the HttpURLConnection, so that
HttpsURLConnection don't need to care about the persistent issues (as
you said above)
I'm sure you have more authority on SSL layer issue than me, so would
you please help to evaluate the feasibility and performance impact of
the above?
Thanks,
Alexander
--
Paulex Yang
China Software Development Lab
IBM
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]