Async support
還沒有人認領這個 Issue。
評估
研究方向
未指定原始檔案、測試或進入點。首先映射目前同步事件處理器的進入點,並審查所引用的 Starlette 和 firebase-admin-python 非同步工作。完成要求包括:定義非同步處理器模型、完成其執行階段整合,並記錄對所述循序和並行使用案例的涵蓋情況。
由索引模型根據 Issue 內容生成。
描述
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/
- 主要語言
- Python
- 星號
- 167
- 分支
- 36
- 平均合併
- 4 天 3 小時
- 30 天內合併 PR
- 1
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
firebase/firebase-functions-python 的其他 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 84/100
-
HttpsError.__init__ does not pass message to super().__init__()可能已有人在做 @Aayush99910 於 2 天前認領。 未關閉
難度 1/5 1 小時以內 新手友好度 85/100
firebase/firebase-functions-python#314 · 1 則留言 ·
-
Add support for VPC direct connect可能已有人在做 @IzaakGough 於 107 天前認領。 未關閉feature-request
難度 4/5 3-5 天 新手友好度 48/100
firebase/firebase-functions-python#275 · 1 則留言 · 1 個 reaction ·
-
feature-request
難度 4/5 3-5 天 新手友好度 35/100
firebase/firebase-functions-python#271 · 3 則留言 ·
-
[Bug] stability_digest_payload_from_ce_payload fails with AttributeError: 'dict' object has no attribute 'split'可能重新可做 關聯的 PR 已關閉且未合併。 未關閉bug unable to reproduce
難度 3/5 1-2 天 新手友好度 55/100
firebase/firebase-functions-python#260 · 6 則留言 ·
查看 firebase/firebase-functions-python 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 86/100
UKGovernmentBEIS/inspect_ai#5802 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
no-human-ai/no_human#660 ·
維護者通常 1 天內回覆
-
documentation good first issue
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
documentation need help question
難度 1/5 1-3 小時 新手友好度 66/100
phonology024/babelscribe#26 ·
-
bug
難度 2/5 1-3 小時 新手友好度 62/100