synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asankha C. Perera" <asan...@wso2.com>
Subject non blocking http - initial checkin
Date Wed, 11 Oct 2006 18:26:59 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
I have checked in the initial cut of the non-blocking http transport as
promised.. however, note that this is still under development and needs
cleanup, refactoring, and some more features and testing to be called
complete or stable. However, the idea is to show how this is going to
be of use to Synapse..and to get initial feedback.<br>
<br>
The o.a.axis2.transport.niohttp.impl package contains the core (Axis2
independent) http transport, with a sample <a
 href="http://svn.apache.org/viewvc/incubator/synapse/trunk/java/modules/niohttp/src/org/apache/axis2/transport/niohttp/impl/ReactorTester.java?view=markup">ReactorTester</a>..
this could be run without the need of Axis2/Synapse etc. This shows how
the (currently single threaded) Reactor hands over a received request
to be processed. In the case of Synapse, this processing will take
place on one of the Synapse threads from a pool. As an example,
consider the case where Synapse sends this off to an actual service
EPR. Once the response is received asynchronously, again a new thread
from the pool will process this response. The example shows how the
response could be tied back to the original request, so that it could
now be forwarded to the client again by attaching to the original
socket.<br>
<br>
<img alt="" src="cid:part1.02050700.05010701@wso2.com" height="280"
 width="505"><br>
The above picture shows the separation of IO threads from those used by
Synapse for processing received messages (i.e. mediation). In essence,
the Synapse threads would never block for IO, and hence if the pool
ever gets exhausted, thats because Synapse is actually performing
message mediation and not blocking on IO. This would allow Synapse to
deal with many clients and backends, using a small pool of threads. The
code generally follows the Reactor pattern described at
gee.cs.oswego.edu/dl/cpjslides/nio.pdf<br>
<br>
The next steps I will be working on are:<br>
&nbsp;&nbsp;&nbsp; Finish implementation of a basic Axis2 http transport over
this<br>
&nbsp;&nbsp;&nbsp; Implement socket timeouts, and support 100 continue and 202
processing<br>
&nbsp;&nbsp;&nbsp; Integration of the Axis2 transport with Synapse - including
testing
with WS-RM etc<br>
&nbsp;&nbsp;&nbsp; Implement SSL support - (client side first)<br>
<br>
Some more steps are documented on the Reactor.java class, but would be
done according to priority and time.<br>
<br>
Your feedback, comments and suggestions for improvement are welcome<br>
asankha<br>
</body>
</html>

Mime
View raw message