Andrew Oliver wrote:

BTW, my next task is an asynchronous implemention of SSL/HTTP on the
server-side.

Explain that? How can it be asynchronous??

Let me be more specific...the underlying SSL packets are of course highly synchronized, but the implementation is asynchronous, i.e. non-blocking. At least from the perspective of the individual threads.


For those who are not familiar with these APIs, the new non-blocking I/O model gives the user the ability to perform I/O operations asynchronously from a thread that may use the data being moved to/from the I/O device, such as a network connection. In essence, this means that you execute an I/O operation and come back later to check for completion. For standard HTTP, this allows you to move data from the I/O buffer and push them through your parser without dedicating a single thread to each connection.

However, for SSL, this process is _much_ more complicated.  The socket-based
implementation hides all the underlying work required to establish and
maintain an SSL session.  This is easily done because the SSL socket wraps
(and hides) the underlying network socket.  When a thread blocks on a
read or write operation on an SSL socket, the SSL socket implementation
may execute several read/write operations on the underlying network socket
to complete or repeat the handshake process, including cipher suite
negotiation.  Since the NIO APIs put the responsibility for moving data
to/from the I/O buffers on the user - there is no easy way to 'hide' the
required handshake/negotiation processes.  Instead, Sun has detached the
entire SSL/TLS mechanism into a standalone object - the SSLEngine.  There
are many benefits to this architecture, including the ability to use SSL
over other I/O mechanisms...you could even (in theory) save an entire SSL
session to disk for later use, such as unit-testing.  However, the downside
is that it is an order-of-magnitude more difficult to use.

Ok...that was a little more long-winded than I intended. Sorry 'bout that!

--
-------------------------------------------------------------------------
Chris Merrill                  |  http://www.webperformanceinc.com
Web Performance Inc.           |  http://www.webperformancemonitoring.net

Website Load Testing, Stress Testing, and Performance Monitoring Software
-------------------------------------------------------------------------


_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to