mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David M. Lloyd" <david.ll...@redhat.com>
Subject Re: [AsyncWeb] Client redesign
Date Sun, 10 Feb 2008 19:48:46 GMT
Alan D. Cabrera wrote:

> I see and take your point.  It is six of one and half a dozen of 
> another.  What I'm confused about is why we need to initially specify 
> anything outside of the actual request.  What problem are we trying to 
> solve?  Maybe I'm misunderstanding what you are espousing so let me put 
> it in my own words and you tell me if it's accurate.  Please ignore the 
> argument of using URIs or discrete parameters for me moment because I 
> think that they are obscuring my real concern.
> 
> HttpClient client = HttpClientFactory.create(baseURI);
> client.send("/foo?pet=cat")
> 
> If this is accurate, I don't understand the need for the baseURI.  Maybe 
> this is a MINA convention?

OK, I see where the disconnect is.  We agree that the high-level API should
work as you describe.  What was discussed earlier was a second, lower layer
to the API - one in which the user can take direct control over the actual
physical connection and impose their own policy.  Use cases for the lower-
level API would include load-balancing, proxies, and that sort of thing: a
lower-level API for lower-level HTTP functions.  This low-level API would,
through some mechanism, allow connections to be established and maintained
independently of the request mechanism - but in order to do so, there must
be a means to specify the actual connection information: protocol (scheme),
hostname, and port.  How this is done is unimportant, as long as the
functionality is present.  This way you get a balance of power and ease-of-use.

Hopefully this clarifies what I was trying to say.  There was a bit of prior
context to the discussion, which I guess I was relying on a bit too much. :-)

- DML

Mime
View raw message