Atmosphere / wasync

WebSockets with fallback transports client library for Node.js, Android and Java
http://async-io.org
161 stars 47 forks source link

Allow for safe coarser-scope shared AsyncHttpClient creation for which no client and its options builder exists. #107

Closed thabach closed 10 years ago

thabach commented 10 years ago

Hi Jeanfrancois

I think we should provide (i.e. I need :) ) a way to create a "globally" shared AsyncHttpClient for which no socket(s) or clients exist yet, but which is subject if being passed to (and thus shared by) all subsequent Socket creations as the shared, underlying runtime.

In addition there should be the possibility of configuring the runtimes' NioClientSocketChannelFactory as well.

Cheers, Christian.

buildhive commented 10 years ago

Atmosphere Framework » wasync #504 UNSTABLE Looks like there's a problem with this pull request (what's this?)

buildhive commented 10 years ago

Atmosphere Framework » wasync #505 UNSTABLE Looks like there's a problem with this pull request (what's this?)

slovdahl commented 10 years ago

Wouldn't it make more sense to have a create(Options, AsyncHttpProviderConfig) method instead? That way you can create the NettyAsyncHttpProviderConfig yourself and configure it any way you want. Now you're adding an explicit dependency on a Netty-specific interface.

jfarcand commented 10 years ago

I agree with @slovdahl , we should not add a strong dependency on Netty as I know some folks using Grizzly.

thabach commented 10 years ago

Ok, currently this class is already tied to Netty in the implementation (but not the API), but with the ProviderConfig parameter we could take that back out as well. I'll come up with another version...

thabach commented 10 years ago

@slovdahl @jfarcand u guys like it better now ?

jfarcand commented 10 years ago

Looks fine for me.

slovdahl commented 10 years ago

Great, looks fine to me too!