Hi Oleg,

thanks for your thoughts. See my comments inline.

> These are some semi-random thoughts in a random order on the matter:
> 
> (1) The proposed use cases will certainly benefit from a non-blocking
> HTTP implementation. I think you should consider basing your work on
> HttpNIO early on. That, of course, means HttpNIO needs to be written
> first, which is a pretty major task in itself.

The problem I see is to get CPU time for sending requests and detecting
responses. We will always need some kind of background thread to do that.
NIO can help to reduce the number of background threads, but that in turn
reduces concurrency: the connections will compete for processing time
from the shared threads. That's why I think that there should be different
options:
 * IO+many threads for best response times
 * NIO+few threads for resource efficiency

> (2) Out of all use cases, certainly useful in some scenarios, HTTP
> pipelining is likely to represent a feature with a wider appeal. This is
> what we should primarily concentrate on. I personally would favour a
> simpler framework that supports only a subset of the HTTP/1.1 protocol
> (no except-continue stuff, for instance) but does it reasonably well.

Agreed. The other use cases are just stepping stones to get there.

> (3) HttpAsych (at least in my opinion) should be a fairly thin layer on
> top of HttpNIO. It should not evolve into something that consists of
> 50-80 java classes and effectively competes with Jakarta HttpClient in
> terms of functionality. 

I want to re-use what I can from the other http-components. The things
I see as specific to async(h) are:

* API (handles, callbacks, notifications,...)
* background thread management (in addition to connection management)
* request scheduling (to optimize connection use)

What I hope to re-use (eventually without additional code) is:

* core classes (connection, method, entity,...)
* request/response interceptors
* knowledge about sequences (retry, auth, redirect,...)

I don't have a clear vision yet of what NIO will provide from the
specific functionality needed for asynchronous communication. And I
can't tell how fast I'll progress once I start coding. We'll see.

cheers,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to