microsoft / microsoft/durabletask-java
Non-blocking Activity task implementations
還沒有人認領這個 Issue。
- 主要語言
- Java
- 星號
- 29
- 分支
- 18
- 平均合併
- 1 天 10 小時
- 30 天內合併 PR
- 2
描述
Issue
The TaskActivity interface is currently has a synchronous run method that returns that output of that activity:
public interface TaskActivity {
Object run(TaskActivityContext ctx);
}
There's currently no way to define a non-blocking, asynchronous activity implementation. This can result in issues related to the scalability of applications if many activity tasks need to be executed concurrently.
Proposal
There should be an alternative mechanism for implementing non-blocking, asynchronous activity tasks. For example:
public interface AsyncTaskActivity {
CompletionStage<Object> run(TaskActivityContext ctx);
}
The activity will finish when the CompletionStage is completed.
Other considerations
It should be noted that Azure Functions for Java doesn't yet support non-blocking functions: https://github.com/Azure/azure-functions-java-worker/issues/244. Support for non-blocking activity tasks likely won't benefit Azure Functions users until the Java worker for Azure Functions adds async function support. Unfortunately, there's no indication about if or when this support will be added.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 TaskActivity 介面開始,追蹤其同步 run 結果的使用方式。在定義實作範圍之前,檢視提議的 AsyncTaskActivity 契約以及連結的 Azure Functions 限制。完成的標準是:就 activity 的非阻塞完成方式及其與現有 activity 執行流程的整合達成一致方案。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- backend
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100