David M. Lloyd wrote:

So basically there's been a number of suggestions as to what to name these things. Here are the two options:

Name from pastebin     Option 1              Option 2
---------------------  --------------------  ----------------------
AsyncHttpClient        HttpClientFactory     HttpClient
HttpRequestor          HttpClient            HttpConnector
HttpFuture             HttpFuture            HttpFuture


Going with Option 1, I took a look at what the current MINA AHC would look like with this API - the result is at http://www.laurinolli.fi/~tazle/http-client-trivial-implementation.patch It isn't exactly like current AHC (it's not possible to close connections at the moment), but pretty close. The AHC tests run, for example.

This implementation gets rid of the resource leaks caused by constantly creating and not disposing NioSocketConnectors, but does not even try to address pipelining or large requests.

Of course nothing is decided until everyone has had a chance to weigh in.

Indeed - I don't particularly like the code I wrote, but I think it needed to be written in order to see what hoops there were to jump through. I think the HttpHandler and HttpFuture interfaces are bad, especially the way IoHandler events are converted into HttpFuture/HttpHandler events. HttpClient on the other hand seems like an interface we should have. It seems ideal for hiding the complexity of possible pipelining or request pooling.

Reply via email to