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