-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve S3 async support #725
Comments
@rocketraman |
+1. Our service logic uses only async APIs for everything else (AWS and otherwise). The only blocking calls we have now are S3 calls. |
@eswenson1 please don't treat async aws sdk calls as non blocking. They actually blocks, but that is moved to separate threads, managed by dedicated thread pool. To be real non blocking internal http client should be changed to non blocking operations (like apache async http client or ning's one), but it seems that it'd be hard to do with current interfaces. My experiments at least show that it's not 5 minute task. |
Thanks, @zeldigas. I have updated my code to treat all calls to AWS async APIs as blocking. |
Hello, not sure whether this fits into the scope of this ticket -- if I understand the current TransferManager correctly, it supports async S3 downloads that are stored into files. It would also be nice to provide an API call that takes a callback on an InputStream. |
@zenogantner I don't think it should provide an API that takes a callback on an InputStream. The InputStream is not reactive. You ask it for data with a call to |
👍 for this, would love to have an async S3 Java client. . . |
Hey folks, just a heads up. Some experiments shows that it's possible with a number of limitations. |
@zeldigas sounds great!!! Thanks. |
Hey guys, we are working on new major version of the SDK which will go into public dev preview at end of month (tentative). The new SDK will have support for non-blocking IO. But it won't include high level utilities like S3 TransferManager, DynamoDb Mapper. Please watch out for the announcement. We really appreciate if you guys try out the new SDK when its released and provide feedback on it. |
@varunnvs92 sounds excellent, thanks for the heads up! |
@mcummingscb code published: https://github.com/zeldigas/aws-sdk-non-blocking |
Awesome, thanks @zeldigas I should be able to try that out soon. |
We just launched a Developer Preview of AWS SDK for Java 2.0 that adds support for this feature request. Try it out and let us know what you think! https://github.com/aws/aws-sdk-java-v2 |
TransferManager
is useful for a subset of operations (upload and download) but doesn't support other operations like getting metadata, deleting objects, checking the existence of an object, and so forth. Since these are all remote operations, blocking is an issue.Please add async support for other S3 operations in addition to upload/download.
Implementation note: I'd like to have an ability to get a
Future
in the implementations of this feature [1]. WithTransferManager
Upload
andDownload
, I must create my ownFuture
as aProgressListener
, which is messy given that internallyUpload
andDownload
can already getFuture
from their internalmonitor
s. This will make it easier to adapt the S3 API to RxJava and other async libs.(Followup on issue #140)
[1] While returning
Future
would be a good lowest common denominator implementation, alternatively, consider exposing a reactive-streams interface for client code. If you do this, the API will be trivially future-compatible with the JDK9 flow apis, and compatible with all sorts of existing java async libraries your users might be using, including RxJava (see for example: https://github.com/ReactiveX/RxJava/wiki/Reactive-Streams) but also many others like Akka, Quasar, Vert.X and others (see http://www.reactive-streams.org/announce-1.0.0). In addition, it has a nice TCK to verify your implementation against the spec (https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.0/tck/README.md). Also note that page above on the RxJava wiki has some good concrete recommendations for library authors.The text was updated successfully, but these errors were encountered: