-
Notifications
You must be signed in to change notification settings - Fork 146
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
feat(batch): Async Processing of Records for for SQS Fifo #3160
feat(batch): Async Processing of Records for for SQS Fifo #3160
Conversation
…sFifoPartialProcessorAsync`
…artialProcessor`
…culation inside mixin
This is the initial implementation of Async processing for FIFO. Using Mixin to decouple common logics. But I might be missing something, please point me to the right direction @dreamorosi |
Hi @arnabrahman, thanks for the PR! I'll review this tomorrow afternoon. I'm currently focused on tomorrow's release and since I think we are still on early phases of the implementation I don't think it'll make it for tomorrow. |
@dreamorosi No worries, take your time 🙂 |
This comment was marked as off-topic.
This comment was marked as off-topic.
Hi @arnabrahman, sorry this is taking a while. This pattern is completely new to me and so I'm taking some time to read about it and understand the impact and future maintainability. |
Hi @arnabrahman - I have a deadline for this year's re:Invent set for Wednesday afternoon. I'm planning on reviewing the PR and provide meaningful feedback by Thursday afternoon. Sorry for the delay - you know I would not let this stall too long if I really didn't have to. Thanks for understanding! |
@dreamorosi, i get it. There's no need to apologize 🙂 |
@dreamorosi, is it ok if i work on other open issues, which are maybe a bit more straightforward than this? As this is in a holding state. |
Hi @arnabrahman, thanks for your patience and for the long wait. I have spent some time looking at this and while the implementation makes sense and works, I am concerned about introducing this pattern in the project. This is likely a limitation of my understanding of the pattern, despite having spent some time on it, but I don't understand why Mixins in TypeScript can't support Based on these issues, this seems to be still a very much open discussion with different workarounds that all have tradeoffs with non-obvious implications (here's a good summary of them). Historically, we've been pretty intentional and somewhat strict with the access patterns we use to define methods, and if anything we are only getting stricter with the gradual adoption of actual JavaScript private classifiers (i.e. Having everything public like in the Ultimately, I am not sure that 1/ the ambiguity derived by TypeScript being unsure about how to treat these in type definitions, and 2/ the precedent of adding ambiguous access patterns in the codebase are worth saving some line of code that we'd have to write if we were to represent these with more vanilla inheritance or abstract classes like we already do with other processors in this package - even if this means having some repetition in the code. I wonder if we could give a try to write this without Mixins and see if the outcome is less problematic. What do you think? |
Yes please, feel free to pick up any of the existing open issues. |
@dreamorosi Thanks for your insight on this. I will write this without mixin & give it a try. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for PR! I have minor comments for clarification on the utility class. I also wonder if it would make sense to pull up a SqsFiroProcessor
class with the utils functionality for both cases.
Co-authored-by: Alexander Schueren <[email protected]>
…s-lambda-powertools-typescript into 3140-async-fifo-processor
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank for the PR @arnabrahman, great work!
While I have an itch to reduce the code duplication in this PR, @dreamorosi and I agreed to move it to a separate task that would affect the entire batch utility. We could simplify a lot of functionality and have a better implementation for sync and asynchronous processors.
Summary
SQS Fifo doesn't have an async processing feature. This PR adds the feature to process async records with SQS Fifo.
Changes
SqsFifoPartialProcessorAsync
is created to handle the async processing.SqsFifoPartialProcessor
processPartialResponse
&BatchProcessingOptions
forSqsFifoPartialProcessorAsync
SqsFifoPartialProcessorAsync
as we did forSqsFifoPartialProcessor
Issue number: closes #3140
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.