Add support for async gRPC in Dapr SDK
See original GitHub issueDescribe the proposal
grpc_asyncio is still WIP. We may need to support it later when grpc_asyncio is stable. https://grpc.github.io/grpc/python/grpc_asyncio.html
Update: grpc_asyncio
is now available, however we should publish an asynchronous Dapr Python SDK as a separate SDK, or at least sub package - like dapr.aio
(from dapr.aio.clients import DaprClient
)
There were concerns from several users about the performance overhead of calling asynchronous methods and running them in a synchronous context, so simply switching over to grpc.aio
is not an option unfortunately.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:11 (5 by maintainers)
Top Results From Across the Web
How-To: Invoke services using HTTP | Dapr Docs
To invoke an application using Dapr, you can use the invoke API on any Dapr instance. The sidecar programming model encourages each application...
Read more >DaprClient usage - Dapr Docs
DaprClient implements IDisposable to support eager cleanup of resources. ... The GrpcChannelOptions object used to configure gRPC; The API Token used to ...
Read more >JavaScript Client SDK - Dapr Docs
The gRPC service gets started in Dapr. We tell Dapr which port this gRPC server is running on through --app-port and give it...
Read more >Getting started with the Dapr client Python SDK
from dapr.clients import DaprClient with DaprClient() as d: # invoke a method (gRPC or HTTP GET) resp = d.invoke_method('service-to-invoke', ...
Read more >How-To: Invoke services using HTTP - Dapr Docs
Step 2: Invoke the service ... To invoke an application using Dapr, you can use the invoke API on any Dapr instance. The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Previous work in progress that could be used for reference but likely needs changing: https://github.com/berndverst/python-sdk/tree/asyncgrpc
These unit tests from the GRPC library might be helpful: https://github.com/grpc/grpc/tree/master/src/python/grpcio_tests/tests_aio/unit
Interested in working on this issue