hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Understanding asynchrounous request processing in Apache Synapse/Axis2/Http Core NIO
Date Sun, 20 Jul 2008 15:49:36 GMT
On Sun, 2008-07-20 at 16:39 +0200, Hubert, Eric wrote:
> Hi devs,
> we are facing an issue in Apache Synapse where HttpClientWorkers are in
> the process of writing a response back to the client using
> HttpCoreNIOSender.sendAsyncResponse(), but are then waiting at
> org.apache.http.nio.util.SharedOutputBuffer.flushContent() to get
> notified by someone...
> I'd like to take this issue as a start to gather more knowledge about
> the internal working of Apache Synapse and http core nio in general.
> Could someone please point me to some documentation, which describes,
> how the request/response processing is working. 


I am very sorry but we currently have almost nothing in terms of
documentation for HttpCore. I am planning to start working on an
HttpCore tutorial in August. 

Asankha knows best about the Synapse NIO transport. I'll happily chip
in information about HttpCore internal stuff


> The response is processed by the ClientWorker who delegates the response
> processing to Axis2 (again the blackbox of AxisEngine.receive,
> AxisEngine.send) and then the response shall be send back to the client
> over the MessageFormatter which again uses some NIO buffer. Here we have
> the trouble that the code in
> org.apache.http.nio.util.SharedOutputBuffer.flushContent() is waiting
> for some notification. Who is responsible for that notification? 

It expects a notification from the I/O reactor it is ready to accept
more output.  

> The
> HttpCoreNIOSender.reactor? I couldn't find any useful API-doc on this.
> I'm also looking for some httpcore-nio-4.0-beta1-sources.jar from any
> Maven Repo to attach to my synapse-IDE project.
> Does anybody know something about possible causes for not getting such a
> notification?

The most likely explanation the output notifications have been suspended
by the protocol handler (Synapse it this case). Apparently Synapse
thinks it is not meant to be producing any output at this point)

> I would be very helpful for any help and pointers to more documentation
> to understand more about the nio stuff.
> Ah, and who creates the I/O Dispatcher? 

Listening or connection I/O reactors

> Are this the IOReactors?

Yes, it is

>  And are
> the I/O Dispatcher again IOReactors?

Yes, they are

Can you reproduce the problem with a test case?


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

View raw message