Async support
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Es werden keine Quelldateien, Tests oder Einstiegspunkte genannt. Beginne damit, die aktuellen synchronen Einstiegspunkte der Event-Handler abzubilden und die zitierte asynchrone Arbeit zu Starlette und firebase-admin-python zu prüfen. Als abgeschlossen gilt die Aufgabe, wenn ein definiertes Modell für asynchrone Handler, seine Laufzeitintegration und dokumentierte Abdeckung für die beschriebenen sequenziellen und nebenläufigen Anwendungsfälle vorhanden sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Would it make sense to support async functions here, so that the event handlers could be called in an async manner and consequently call async libraries?
This way a single instance could be handling more requests in parallel, for example if the cloud function calls several external APIs in a sequence to complete a process, and spends most of the time just waiting for responses, and uses only a little memory and CPU in general.
It is possible to call async code from the current sync functions, but it does not help with scalability, as the cloud function itself still blocks during the whole operation. This can help to do things in parallel in a cloud function, but not with sequential operations, which are common at least in our use case.
The original JS runtime is async, like all things Node, but also Python has standard async in version 3. Consequently, firebase-admin-python has worked on adding async support, since google-auth added async support in 2021. https://github.com/firebase/firebase-admin-python/issues/104
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!
Starlette is a popular, lightweight ASGI framework which could maybe used for this, the same way Flask is for the sync version? https://www.starlette.io/
- Vorherrschende Sprache
- Python
- Sterne
- 167
- Forks
- 36
- Ø Merge
- 4 T. 3 Std.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus firebase/firebase-functions-python
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
-
HttpsError.__init__ does not pass message to super().__init__()Evtl. vergeben @Aayush99910 hat das vor 4 Tagen übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
firebase/firebase-functions-python#314 · 1 Kommentar ·
-
Add support for VPC direct connectEvtl. vergeben @IzaakGough hat das vor 108 Tagen übernommen. Offenfeature-request
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
firebase/firebase-functions-python#275 · 1 Kommentar · 1 Reaktion ·
-
feature-request
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
firebase/firebase-functions-python#271 · 3 Kommentare ·
-
[Bug] stability_digest_payload_from_ce_payload fails with AttributeError: 'dict' object has no attribute 'split'Evtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenbug unable to reproduce
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
firebase/firebase-functions-python#260 · 6 Kommentare ·
Alle Issues in firebase/firebase-functions-python
Ähnliche Issues
-
enhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
hatchet-dev/hatchet#5179 ·
Maintainer antworten meist innerhalb von 1 Tag
-
python-version
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug javascript P2-medium python release:v3.1
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
adrirubio/claude-deck#546 ·
Maintainer antworten meist innerhalb von 1 Tag