On Mon, 2007-01-15 at 15:47 +0530, Asankha C. Perera wrote:
> Hi Oleg
> 
> > > Synapse also wants SSL support in server and client mode, and we are ok 
> > > to move to JDK 1.5 to do this with NIO.
> > > 
> > > Another optimization we would like to have is the ability for the client 
> > > API to be able to reuse underlying connections if possible - i.e. 
> > > something in the lines of a connection pool. In some preliminary 
> > > performance testing, opening a new socket for each message being sent to 
> > > a back-end causes us a huge cost.
> > >     
> > 
> > Not done yet, but certainly planned
> >   
> I have completed a basic http transport for Synapse using HTTP core
> with NIO extensions for both client and server sides
> 
> I see you have already started to look into the connection manager
> (HTTPCORE-25) issue to reuse connections for the client side. 

Hi Asankha,

We are currently working on improving the blocking version of HTTP
connection management components in HttpConn module of HttpClient, but
certain adjustments in priorities in order to tackle HTTPCORE-25 first
is an option. Would you be interested in giving us a helping hand
developing / testing a non-blocking HTTP connection manager?

> I am also particularly interested on how to use SSL with this new
> transport now. Could you help me get started on this?
> 

HttpCore NIO has been designed to work with any arbitrary SocketChannel,
so adding SSL layer security should not be difficult. All it takes is
making sure the I/O reactor instantiates the appropriate channel when
connecting to a remote host or listening for incoming connections. The
best approach to achieve this would be to use the good ol' factory
pattern

The line 170 in DefaultConnectingIOReactor[1] and the line 126 in
DefaultListeningIOReactor[2] need to be replaced with a call to a
channel factory and the desired factory implementation should be
injected at the start-up.

Please go ahead and open a feature request in JIRA. Alternatively you
may just want to subclass the default I/O reactor impls and to override
#connect() and #listen() methods.

Cheers

Oleg


[1]
http://jakarta.apache.org/httpcomponents/httpcore/jakarta-httpcore-nio/xref/org/apache/http/nio/impl/reactor/DefaultConnectingIOReactor.html#170
[2]
http://jakarta.apache.org/httpcomponents/httpcore/jakarta-httpcore-nio/xref/org/apache/http/nio/impl/reactor/DefaultListeningIOReactor.html#126


> thanks
> asankha
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED] For
> additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to