-
Notifications
You must be signed in to change notification settings - Fork 328
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
FR: Async requests #104
Comments
Can this be not handled in the application code? Basically execute Admin SDK methods like |
It won't scale as I would like and, to my opinion, complicates the code and is harder to track. |
Most of our users are on Python 2.7, so we cannot directly expose async coroutines from the SDK anytime soon. In the meantime you should be able to get around the scalability issues by using the
|
In case anyone runs into the same problem - For |
@eranhirs would you feel like starting a async-firebase project that we could contribute to? |
I wanted to report that having async support for an auth SDK is very important. This is exactly the area where async frameworks make a huge difference, where you do a client side request inside a server side request. Please consider adding core support and examples for using with ASGI frameworks, like Starlette: |
I agree with the general feeling here. Not having async support is making this library a tad less useful nowadays. Not very future proof unfortunately. |
+1 on this. My project has a few hundred thousand items that need to be worked via Firebase, and ~1 second latency times make wait times intractable without async support |
Python 2.7 is no longer supported. Any progress here? |
This needs to be first addressed in other GCP Python libraries that we use as dependencies. More specifically, the google-auth library (which we use to make all authorized HTTP calls) needs to support it. From what I can see, they have plans to add async support starting from 2020, but there is no concrete timetable as of now: googleapis/google-auth-library-python#321 I can only imagine that this will take a while considering the engineering effort that is involved. Pretty much all existing APIs have to be re-evaluated and redesigned for async support. If google-auth takes a very long time to introduce async support, we can consider wrapping the existing google-auth APIs in async threads, so that at least firebase-admin can expose an async API to the developer. But even that is going to require a lot of work, based on some prototyping results I've managed to put together. |
Make Firebase calls asynchronous by running them in a ThreadPoolExecutor: firebase/firebase-admin-python#104 (comment) This touches a lot of code, because a new formatter was introduced as well.
Is there any development on this front? |
There's been no development in this space afaik. We cannot support an async API until the core GCP Python libraries like |
It seems there is an open PR related to adding async support. One of the contributors to the libraries just left a comment. Would be great to hear about firebase-admin maintainers/contributors perspective on this. :) Edit: I will look into the repo you linked and file a feature request maybe, thanks for the reply :) |
Good to know that Firestore APIs are entirely developed in the |
Great to hear these, thanks a lot @hiranya911 :) |
It seems that an async-based auth flow was added to Are there any plans to make this library async-compatible now that its dependencies seem to have done so? |
Good news! We are prioritizing this task and have plans to start the initial planning work over the coming months. It is still too early to provide a timeline, but I will reopen this issue so we can track the progress here. Thank you everyone for your patience! |
Hi! Is there any update about this feature ? I saw a pull request to use new version of the google-auth api, would that fulfill prerequisites ? |
Hello! I know the last comment wasn't left here long ago, but as it didn't get any answer, I'm posting another one. Many thanks! |
Thank you again for your patience on this! |
Hey Folks, We just released v5.3.0 which added async support for the Cloud Firestore API. This is the first step into fulfilling this FR so please give it a try and let us know what you think! |
Seems to be working well, we haven't used this under heavy load yet, though. I'm curious to hear how others are experiencing this, but AFAIK it's good and robust. We mostly use firestore and do async gcloud storage uploads too, so things are pretty good. Messages seems to be one thing missing? #639 |
Hi, are there any plans to add async support to the admin auth client? Thanks for the great work! |
I am using
firebase-admin
on anasyncio
project and when there are a lot of requests it slows down the whole API.Surprisingly, I didn't see any other issues about this, I hope I am not duplicating.
Thanks
The text was updated successfully, but these errors were encountered: