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

Reactive S3 adapter - Project Reactor support #214

Closed
roger751 opened this issue Jan 3, 2022 · 18 comments
Closed

Reactive S3 adapter - Project Reactor support #214

roger751 opened this issue Jan 3, 2022 · 18 comments
Labels
component: s3 S3 integration related issue type: enhancement Smaller enhancement in existing integration type: feature Integration with a new AWS service or bigger change in existing integration
Milestone

Comments

@roger751
Copy link

roger751 commented Jan 3, 2022

Type: Feature

Is your feature request related to a problem? Please describe.
As specified in spring-attic/spring-cloud-aws#802 and in spring-projects/spring-integration-aws#198, there should be support for Reactive Streams in the new AWS SDK v2 rewrite. I would be glad if this would be added to the milestone https://github.com/awspring/spring-cloud-aws/milestone/4.

Describe the solution you'd like
Enable the usage of Project Reactor with spring cloud aws.

Describe alternatives you've considered
As previously mentioned, this is a great example of self implementation https://github.com/eugenp/tutorials/tree/master/aws-reactive.

@github-actions github-actions bot added type: enhancement Smaller enhancement in existing integration status: waiting-for-triage Team has not yet looked into this issue labels Jan 3, 2022
@MatejNedic MatejNedic added component: s3 S3 integration related issue type: feature Integration with a new AWS service or bigger change in existing integration and removed status: waiting-for-triage Team has not yet looked into this issue labels Jan 7, 2022
@maciejwalkowiak maciejwalkowiak added this to the 3.0.x milestone Feb 6, 2022
@markusherbert
Copy link

@maciejwalkowiak any updates on this?

@markusherbert
Copy link

I think it would also be nice if there would be support for Spring Integration with Project Reactor. Something like ReactiveS3MessageHandler

@maciejwalkowiak
Copy link
Contributor

Not yet, but once #275 is done, this issue will become open for contributions.

@jifeiiii
Copy link

Anticipated feature. Also wanted with spring-projects/spring-integration-aws#198 - a Reactive Spring Integration channel adapter.

@maciejwalkowiak maciejwalkowiak modified the milestones: 3.0.0 M1, 3.x Apr 2, 2022
@maciejwalkowiak
Copy link
Contributor

In regards to reactive - thinking how to do it right. We can easily auto-configure S3AsyncClient but likely we can do more. One is integrating code from Baeldung, another one is wrapping S3AsyncClient CompletableFutures with Mono in S3ReactiveClient. Wrapping could be done actually for all async clients.

If you have more ideas please share, perhaps we can come up here with conclusions and open this issue for contributions.

@markusherbert
Copy link

markusherbert commented Apr 10, 2022

Yeah wrapping S3AsyncClient with a reactive class that will still give access to the underlying client sounds like the ideal way to go

@markusherbert
Copy link

I'd put S3AsyncClient as an argument in the constructor of S3ReactiveClient

@jifeiiii
Copy link

Any progress and a tracking issue so people can help?

@maciejwalkowiak
Copy link
Contributor

Design work is pending. We are open for suggestion or even PRs but can't guarantee that anything will get merged until we do more research.

@sgarfinkel
Copy link
Contributor

sgarfinkel commented May 21, 2022

The latest versions of the SDK allows you to return an SdkPublisher<ByteBuffer> (which extends Publisher<ByteBuffer>) which you can use to map to the underlying byte array: https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/core/internal/async/PublisherAsyncResponseTransformer.html.

The main issue with doing this is backpressure management is a bit of a pain here , from what I understand the upstream Publisher will basically buffer endlessly until finished, which for large files with slow consumers isn't necessarily ideal.

@rolkhas2
Copy link

@sgarfinkel I see that the Publisher you've mentioned is on an internal directory. I'm not sure if that's targeted for public use.

@lynch19
Copy link

lynch19 commented Jul 23, 2022

@maciejwalkowiak Can you publish the timeline for this issue? Users like me depend on this and cannot use Spring-Cloud-AWS at all without this issue being resolved.

@maciejwalkowiak
Copy link
Contributor

@lynch19 it's almost certain this will not end up in 3.0. We have still too much work with other integrations to do before we can start working on reactive support. But, we're open for suggestions/contributions - if you have an idea how reactive support could look like, please let us know.

@lynch19
Copy link

lynch19 commented Jul 26, 2022

@maciejwalkowiak I can try to take a basic start for this, but I'm not sure what have been already planned, or shall I just open some PR and let the discussion flow

@maciejwalkowiak
Copy link
Contributor

Nothing has been planned so far so feel free to open a sketch PR but please keep in mind that it may not get merged.

@zaredea
Copy link

zaredea commented Sep 29, 2022

Would there be any progress on this subjectsoon?

@maciejwalkowiak
Copy link
Contributor

@zaredea No unless someone from the community comes up with a sketch PR.

@maciejwalkowiak
Copy link
Contributor

Considering the efforts needed to support reactive APIs we took the decision to not develop it in near future. We may embrace in the future async clients more than we do right now, which would make it easier for users to adapt to reactive apis themselves.

@maciejwalkowiak maciejwalkowiak closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: s3 S3 integration related issue type: enhancement Smaller enhancement in existing integration type: feature Integration with a new AWS service or bigger change in existing integration
Projects
None yet
Development

No branches or pull requests

9 participants