Hi,

We are thinking and planning to add proper multiplexing Async behaviour in 
jClouds. We plan to use the apache async httpClient library to achieve the same.

We are still thinking about how to implement this in jClouds and s3 proxy but 
below are are initial thoughts.
1. Move to Java 1.8 so we can start using CompletableFutures. (Let us know if 
you feel there are any issue in upgrading JAVA version)
2. Add a new annotation like @async which can be used in the client interfaces 
like AzureBlobClient.java, S3Client.java.
3. Add new methods for async in BlobStore and implement then in the specific 
stores. The methods will return completableFutures.
4. In the core http package add the apache async httpClient based class. Which 
will execute async http requests and return completable futures. (We are not 
sure if we can just add a implementation of BaseHttpCommandExecutorService.java 
for the same)
5. Make some changes in the DelegatesToInvocationFunction.java to see if async 
annotation is present and then using the Async client http executor.
6. The S3 proxy use jetty continuations to suspend the thread and then continue 
after the async method is done (using thenAccept in the Completable Future).

Please do let me know your thoughts on this. Do you feel like this feature 
would be something useful for jClouds? Do you think we are on the right track 
on the way we plan to implement it? Any suggestions from your side?

Regards,
Spandan Thakur

Reply via email to