Folks, I put some significant efforts into improving HttpCore NIO extensions in the past few weeks. There has been a few notable improvements.
(1) I have completely reworked the protocol layer and moved a lot of ugly plumbing code into the framework itself. So, I hope you agree sample applications got significantly shorter, simpler and cleaner http://svn.apache.org/repos/asf/jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/nio/examples/NHttpClient.java http://svn.apache.org/repos/asf/jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/nio/examples/NHttpServer.java (2) NIO extensions now provide two types of HTTP protocol services: buffering and throttling http://svn.apache.org/repos/asf/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java http://svn.apache.org/repos/asf/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/BufferingHttpServiceHandler.java * The buffering variant does not requite worker threads. It processes HTTP requests and generates HTTP responses on the main I/O thread and buffers content entirely in memory. It is simple but clearly is only suitable for processing very small messages. It also assumes that HTTP request handlers do not block indefinitely. * The throttling variant requires a small number of worker threads and uses them to off-load the process of request processing and response generation. It also allocates a fixed sized content buffer and can work with nearly constant memory footprint. (3) More importantly, however, is that we now have a complete HTTP testing framework based on HttpCore NIO. We can now use client-side NIO code to test server side NIO code and visa versa. I have started putting together a suite of test cases to test HTTP processing form end to end. At the moment I only have the most fundamental cases covered, but will work on adding more complex ones. http://svn.apache.org/repos/asf/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java Adding more complex test cases based on this testing framework would be a major contribution to the project Cheers Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
