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

[AsyncIO] Overview of gRPC AsyncIO integration #23

Closed
7 tasks done
lidizheng opened this issue Apr 9, 2020 · 1 comment
Closed
7 tasks done

[AsyncIO] Overview of gRPC AsyncIO integration #23

lidizheng opened this issue Apr 9, 2020 · 1 comment
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@lidizheng
Copy link
Contributor

lidizheng commented Apr 9, 2020

AsyncIO introduces async/await keywords. In order to plumb through the asynchronous-ness of functions, the library has to expose async functions on its surface. So, while integrating gRPC AsyncIO, we might need to instrument following classes in order to make gRPC AsyncIO work.

Also, since python-api-core supports all Python versions, we can't use any async/await in existing modules. If needed, the import of new AsyncIO modules will be protected by explicit version check.

A all-in-one draft PR can be found: #22.

  • google.api_core.async_future
  • google.api_core.gapic_v1.config_async
  • google.api_core.gapic_v1.method_async
  • google.api_core.operations_v1.operations_async_client
  • google.api_core.grpc_helpers_async
  • google.api_core.operation_async
  • google.api_core.retry_async

Unit tests included for all new modules under tests/asyncio.

For each module, I will create separate issues and PRs later.

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Apr 9, 2020
@busunkim96 busunkim96 added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed triage me I really want to be triaged. labels Apr 13, 2020
gcf-merge-on-green bot pushed a commit that referenced this issue Jun 2, 2020
Children PR of #26.

This PR includes AsyncIO version of:
* Polling future
* Page iterator

The AsyncIO version of polling future still uses the same mechanism as the sync version. The AsyncIO polling future tries to update its own state whenever the application want to access information or perform actions.

For page iterator, it has similar interface design as sync version. But instead of fulfilling normal generator protocol, it is based on the async generator.

Related #23
gcf-merge-on-green bot pushed a commit that referenced this issue Jun 4, 2020
@lidizheng
Copy link
Contributor Author

With all components released, this issue should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants