jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: Client framework

From: Bill Burke <bburke_at_redhat.com>
Date: Tue, 12 Apr 2011 15:43:51 -0400

On 4/12/11 2:25 PM, Jan Algermissen wrote:
>
> On Apr 12, 2011, at 1:21 PM, Adam Bien wrote:
>
>> Regarding SPI: IMHO at least the threading model (ExecutorService) should be pluggable and so well defined.
>> A client API could and will be used on server side as well - so threading and scalability will be an issue.
>
> +1
>
> And this is an important issue in general and IMHO deserves the same attention as 'traditional' (aka database) connection management. IOW, HTTP connection management should be orthogonal to resource implementations. Several resources could well use the same HTTP connection to an upstream HTTP server.
>


IMO, an Executor is as simple as:

interface Executor {

    Response execute(Request request);

}

In resteasy, we've been able to pretty much delegate to any HTTP client
api with that one simple interface (Apache HTTP Client 3.1, 4.x,
java.net.URL)

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com