tags:

views:

248

answers:

3

Do you know of any free Java library which support the HTTP pipelining option of HTTP/1.1 ( http://en.wikipedia.org/wiki/HTTP_pipelining ) ?

+1  A: 

I don't think you will find any common ones supporting pipe-lining. Jetty HttpClient seems to support it from document but I couldn't make it to do it.

Please note that Pipeline is different from keep-alive. Keep-alive just means reuse the connection but it may still send one request at a time over the connection. With pipe-lining, you can send several requests at the same time on the same connection and wait for multiple responses.

ZZ Coder
+1  A: 

HTTPClient apparently supports pipelining here:

http://www.innovation.ch/java/HTTPClient/

but I haven't tried it personally and can't verify this.

Jon
Commons HTTPClient has an open RFE for the same functionality - https://issues.apache.org/jira/browse/HTTPCLIENT-258
Jon
A: 

hotpotato will support pipelining really soon. Performance-wise, it's way superior to Apache's HTTP Client, especially in high concurrency environments (multiple threads using the same instance of the client).

I still need to publish the results but on a LAN test, I'm getting ~7000req/s (hotpotato) vs ~100req/s (apache's). Of course, a great deal of the merit must go to Netty, the amazing framework hotpotato is built upon ;)

If you don't need a fancy full-fledged client, take a look here for a simpler version.

brunodecarvalho