microsoft / microsoft/durabletask-java
Non-blocking Activity task implementations
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 29
- Fork
- 18
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 2
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với interface TaskActivity và theo dõi cách kết quả đồng bộ của run được sử dụng. Xem xét contract AsyncTaskActivity được đề xuất và hạn chế Azure Functions được liên kết trước khi xác định phạm vi triển khai. Được xem là hoàn tất khi đã thống nhất một phương án cho việc hoàn tất activity không chặn và tích hợp phương án đó vào luồng thực thi activity hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- backend
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100