You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Nikola Knezevic <la...@gmail.com> on 2014/05/12 11:34:28 UTC

NIO/NIO2 in jclouds

Hi all,

is jclouds using NIO (or specifically, NIO.2) for handling networking
tasks? I can't find any reference in the sources.

Thanks,
Nikola

Re: NIO/NIO2 in jclouds

Posted by Andrew Phillips <an...@apache.org>.
> is jclouds using NIO (or specifically, NIO.2) for handling networking
> tasks? I can't find any reference in the sources.

jclouds uses a "driver" model to handle actions that could have  
different implementations, such as HTTP or SSH traffic. For HTTP  
traffic, the default option is to use the basic java.net  
(non-NIO/NIO.2, as far as I recall) options [1]. Optionally, you can  
use Apache HC [2] or OkHttp [3] instead.

 From what I gather, Apache HC supports NIO (although I'm not sure  
what it uses internally to implement that). I don't think we use that  
in jclouds, however.

Could you let us know a bit more about the background to your  
question? Are you running into any particular performance or other  
issues?

Regards

ap

[1]  
https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java
[2] https://github.com/jclouds/jclouds/tree/master/drivers/apachehc/
[3] https://github.com/jclouds/jclouds/tree/master/drivers/okhttp