1) Is there an implementation of the aws sdk which uses asynchronous I/O instead of thread pools? I am working on a highly scalable web service and profiling shows that the CPU is wasting a lot of cycles managing network I/O to and from amazon.
2)The current client uses Apache Http Client, if I cannot find an asynch implementation I will fork my own version to implement it. I was thinking of using the Jetty Http Client. Is it bad form to mix Jetty and Apache libraries? Is there a better alternative?
Not that I know of, and I’d be surprised this to be difficult to find, if it would exist already.
There is a better alternative indeed – the AWS SDK for Java currently uses the Http Client version 4.x (you linked to the legacy 3.1 version JavaDocs instead) from Apache HttpComponents, which conveniently provides a Async HttpClient as well:
As emphasized, it should only be facilitated for respective uses cases, but (as per your comment) you are sending thousands of requests to AWs which means that open requests tend to pile up, so this might help indeed.