hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCORE-48) Make SSL IOSession decorator to use an Executor interface to execute all potentially blocking handshake tasks
Date Sat, 30 Jun 2007 18:42:04 GMT

    [ https://issues.apache.org/jira/browse/HTTPCORE-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12509319
] 

Oleg Kalnichevski commented on HTTPCORE-48:
-------------------------------------------

> I think that when the call to bind return, the caller expect that the IOSession has done
all the bind stuff including ssl handshaking

Andrea,

Non-blocking SSL is so damn complex that it can easily cause your brains to boil. Proceed
at your risk ;-) 

The whole point of non-blocking I/O is that input / output operations never block. The process
of ssl handshaking can take a very long time especially if certificate revocation lists need
to be consulted. So, #bind() is expected to initiate the SSL handshaking process and to terminate
immediately. It is not meant to block. The SSLSession will not trigger any events on the handler
interface until is fully initialized. More importantly both client and server MAY request
the handshake to be repeated at ANY point of time causing the session to be re-initialized.
One may NEVER assume the session is fully initialized because of that.  

The purpose of using an Executor is not ensure I/O dispatcher thread is not blocked by synchronous
tasks such as SecureRandom initialization and the certificate revocation check.

Hope this helps somewhat

Oleg



> Make SSL IOSession decorator to use an Executor interface to execute all potentially
blocking handshake tasks
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-48
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-48
>             Project: HttpComponents Core
>          Issue Type: Improvement
>          Components: HttpCore NIO
>            Reporter: Oleg Kalnichevski
>             Fix For: 4.0-beta1
>
>
> Presently the SSL IOSession decorator executes all potentially blocking handshake tasks
on the I/O thread. Use an Executor interface from java.util.concurrent to make possible the
execution of handshake tasks using worker threads, thus making the I/O thread available for
processing I/O events even if some SSL connections are blocked pending completion of a handshake
task.
> Oleg

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message