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 Thu, 12 Jul 2007 10:21:04 GMT

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

Oleg Kalnichevski commented on HTTPCORE-48:

> In your opinion the best way to follow is that of getting a Runnable from getDelegatedTask()
and then run it in an executor? 

Hi Andrea

Yes, I believe it is.

#getDelegatedTask() returns a non null Runnable when the SSLEngine instance is in the NEED_TASK
state (see SSLIOSession#doHandshake()). Presently #doHandshake() dumbly executes the runnable
in the same thread, which effectively blocks the I/O reactor preventing it from dispatching
events on ALL sessions, which is not nice. 
            case NEED_TASK:
                Runnable r = this.sslEngine.getDelegatedTask();
Instead we should be using an executor to make it possible to execute the Runnable in a separate
thread without blocking the I/O reactor. Of course the difficult bit in this exercise is ensuring
proper task synchronization. I/O session may not resume until the delegated task is completed.


> 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
> 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

View raw message