-
Notifications
You must be signed in to change notification settings - Fork 52
Add support for multi instance query #42
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
Conversation
cgillum
left a comment
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.
Looking good so far! I'll admit that this pageable stuff is new to me. Will you be able to add some tests to help verify the functionality (and provide examples of how to use the API)?
|
The latest iteration includes a bunch of changes to other files as part of adding unit tests.
|
|
@cgillum the integration test I added shows an example of the benefit of this abstraction layer. Instead of the static switch case implementation there though, an activity would in turn call an API or something that itself is paged. For a CosmosDB query, they could return a single page at a time there. For a query to the API I just introduced, the implementation would be something like This won't really be exposed right away to customers as the |
cgillum
left a comment
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 adding the new tests! Left a few comments, but nothing blocking.
This PR introduces support for querying multiple orchestration instances over gRPC. The implementation also takes a page out of Azure SDKs book by copying their
AsyncPageabledesign (pun intended). This abstraction layer is important as we want to accomplish 2 primary goals with our async enumerable implementation:AsyncPageable<T>implementsIAsyncEnumerable<T>.AsyncPageable<T>.AsPages()allows for this via.AsPages(continuationToken).FirstAsync()fromSystem.Linq.Asyncpackage.AsyncPageable<T>itself.resolves #2