hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TomStrummer <tomstrum...@gmail.com>
Subject ThreadSafeClientConnManager and pool size
Date Thu, 18 Dec 2008 19:33:47 GMT

Hi, 

I'm working on a project that creates a simple HTTP client "builder DSL" for
the Groovy programming language
(http://groovy.codehaus.org/modules/http-builder/).  Built on HttpClient 4.

One feature I'm trying to add is a builder that automatically executes
requests asynchronously.  This is easy to do (from a user standpoint)
because their response handling code is already packaged in a closure which
is easy to execute asynchronously. (think Prototype.js' Ajax.Request).

So I have three questions:

I'm looking at ThreadSafeClientConnManager and I'm wondering why it doesn't
use a java.util.concurrent ThreadPoolExecutor to allow for a dynamic pool
size?  It looks like there are a number of classes in that package to handle
general concurrency and I'm wondering why the concurrent* library wasn't
used.  

Is it true that HttpClient 4 already requires Java 1.5?

I'd also consider using NIO but from what I read in another thread, it's
inefficient unless you're talking thousands of simultaneous requests,
correct?  I'm not expecting my code to be used for anything like that :) 
But I thought a flexible pool size would be a nice feature :)

Thanks for the input. 

-Tom


-- 
View this message in context: http://www.nabble.com/ThreadSafeClientConnManager-and-pool-size-tp21079444p21079444.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


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


Mime
View raw message