Non-blocking client without Jersey's thread pool

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Non-blocking client without Jersey's thread pool

Grenville Wilson
Hey,

I was wondering what plans there are to allow Jersey clients to invoke
non-blocking IO without spawning a new thread? As far as I can tell, the
current design means that any async client calls will necessarily create
a new blocking thread - even when using a non-blocking client adapter
like the GrizzlyConnector or NettyConnector.

Thanks,
Grenville Wilson


signature.asc (949 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-blocking client without Jersey's thread pool

Pavel Bucek-2
Hi Grenville,

async is not non-blocking .. but I guess you know that.

Yes, there are plans to do NIO for JAX-RS 2.1 (and consequently for
Jersey, since it is the reference implementation).

Unfortunately, there is no ETA yet.

Regards,
Pavel


On 02/09/16 21:36, Grenville Wilson wrote:

> Hey,
>
> I was wondering what plans there are to allow Jersey clients to invoke
> non-blocking IO without spawning a new thread? As far as I can tell, the
> current design means that any async client calls will necessarily create
> a new blocking thread - even when using a non-blocking client adapter
> like the GrizzlyConnector or NettyConnector.
>
> Thanks,
> Grenville Wilson
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-blocking client without Jersey's thread pool

Grenville Wilson

I see. There seems to be a pull request open to add support for non-blocking calls when using a non-blocking connector. Is there anything I could do to get it into a mergeable state? It seems a shame to have connectors for Grizzly and Netty NIO clients, but no ability to actually engage in NIO.


On 09/07/2016 08:18 AM, Pavel Bucek wrote:
Hi Grenville,

async is not non-blocking .. but I guess you know that.

Yes, there are plans to do NIO for JAX-RS 2.1 (and consequently for Jersey, since it is the reference implementation).

Unfortunately, there is no ETA yet.

Regards,
Pavel


On 02/09/16 21:36, Grenville Wilson wrote:
Hey,

I was wondering what plans there are to allow Jersey clients to invoke
non-blocking IO without spawning a new thread? As far as I can tell, the
current design means that any async client calls will necessarily create
a new blocking thread - even when using a non-blocking client adapter
like the GrizzlyConnector or NettyConnector.

Thanks,
Grenville Wilson




signature.asc (949 bytes) Download Attachment
Loading...