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

Presentation: Add functions that return async iterators for paged responses #6472

Merged
merged 89 commits into from
Mar 4, 2024

Conversation

Yato333
Copy link
Contributor

@Yato333 Yato333 commented Feb 27, 2024

Closes #6314

  • Add StreamedResponseGenerator class which sends paged requests and returns a response containing an async iterator. It uses RXJS internally to fetch pages in parallel.
  • Use this class for all existing API functions that send paged requests.
  • Deprecate all existing functions in PresentationManager, that return responses for paged requests as arrays and add alternatives that return async iterators.

@Yato333 Yato333 requested a review from a team as a code owner February 27, 2024 14:53
Copy link
Member

@grigasp grigasp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, could we have async iterator versions of the following, too?

  • getDisplayLabelDefinitionsIterator - should be simple.
  • getContentIterator - could return a type { descriptor: Descriptor, total: number, items: AsyncIterableIterator<Item> }.

Co-authored-by: Grigas <35135765+grigasp@users.noreply.github.com>
@Yato333 Yato333 marked this pull request as ready for review March 1, 2024 15:29
@Yato333 Yato333 marked this pull request as draft March 1, 2024 15:30
@Yato333 Yato333 marked this pull request as ready for review March 4, 2024 09:53
@Yato333 Yato333 requested a review from grigasp March 4, 2024 09:58
@Yato333 Yato333 enabled auto-merge (squash) March 4, 2024 11:23
@Yato333 Yato333 merged commit d1b9f65 into master Mar 4, 2024
16 checks passed
@Yato333 Yato333 deleted the presentation/page-streaming branch March 4, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Presentation: Stream result sets as the requests are fulfilled
4 participants