Skip to content
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

Async / streaming support #2178

Open
martin-traverse opened this issue Aug 24, 2023 · 0 comments
Open

Async / streaming support #2178

martin-traverse opened this issue Aug 24, 2023 · 0 comments
Labels
api: storage Issues related to the googleapis/java-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@martin-traverse
Copy link

Hello,

Please can we get a version of the storage API for Java that supports async and streaming operations. Both AWS and Azure have had this capability for some time, with separate async versions of their client classes.

While the blocking paradigm is good for small, simple applications there are many more advanced use caseas where this model is not a good fit. For example, middlewares and performance-critical platform code. I appreciate that the current SDK does do some buffering on read and write operations to minimize blocking, but this is not the same as providing a streaming data API, there is no solution for non-blocking read and flow-control cannot be integrated into the client code portion of the data pipeline. Unary operations also require thread-per-operation.

As a reference point, AWS uses Java's CompletableFuture for unary operations and provides implementations of org.reactivestreams Publisher / Subscriber classes for data transfer. Azure uses the full Project Reactor API, with Mono for unary operations and Flux for data transfer. Both of these approaches are quite sufficient for our use case, which requires each operation to run async on a single event loop with backpressure from the storage SDK up into our platform code an ultimately the client API. Also using e.g. Guava futures with the gRPC stream obvserver API would be sufficient for us, so long as the manual flow control interface was exposed, or another dedicated API that follows a simillar pattern.

As per our conversation in #2121, there is not currently a solution for an async storage API. The new gRPC API does support async, but (a) this is not ready for public use and (b) it is intended anyway as a low-level, internal API which is lacking a lot of functionality, e.g. error handling, retries etc.

@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/java-storage API. label Aug 24, 2023
@sydney-munro sydney-munro added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/java-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants