Open sfmskywalker opened 3 weeks ago
To address the challenges and improve the scalability and manageability of workflow execution, the proposed changes to the IWorkflowRuntime
interface and the adoption of Proto.Actor as the primary execution runtime seem to be a strategic move. Here's a summary of the proposed changes and their benefits:
Decouple Workflow Matching and Execution: By introducing a WorkflowMatcher
service, the system can separate concerns, leading to cleaner code and potentially easier maintenance.
Interface and Method Refinements: The addition of a CreateWorkflowClient
method to IWorkflowRuntime
will provide a clear and consistent way to interact with workflow instances, improving the developer experience.
Terminology and Structural Adjustments: The new terminology ("stimuli") and the concept of local and remote contexts will help clarify the workflow execution process and the role of different components within the system.
Enhancements through Proto.Actor: The benefits of using Proto.Actor include lock-free execution, event sourcing, improved pub/sub mechanisms, simplified cancellation, and performance improvements due to in-memory state management.
Overall, these changes are expected to result in a more scalable, efficient, and manageable system. The adoption of Proto.Actor will leverage its distributed system features, which should enhance the system's responsiveness and reliability.
This comment was generated by Glime.
Objective
To improve the scalability and manageability of workflow execution, we propose refactoring the
IWorkflowRuntime
interface and fully adopting Proto.Actor as our primary execution runtime.Current Challenges
IWorkflowRuntime
interface is responsible for both workflow lookup and execution, leading to code duplication and complexity across its implementations (Default Runtime
andProtoActor Runtime
).Proposed Changes
Decouple Workflow Matching and Execution:
IWorkflowRuntime
.WorkflowMatcher
service to handle finding workflows based on stimuli (renamed from "bookmark + trigger hashes").Interface and Method Refinements:
CreateWorkflowClient
method toIWorkflowRuntime
to return anIWorkflowClient
, serving as a proxy to the workflow instance.Local Workflow Runtime
andProtoActor Workflow Runtime
to reflect different operational contexts.Terminology and Structural Adjustments:
Enhancements through Proto.Actor:
WorkflowInboxMessages
DB table.Benefits
Adopting this refactoring will lead to a more scalable and efficient system with significantly simplified codebase and operational enhancements. The use of Proto.Actor will allow us to leverage advanced distributed system features, enhancing overall system responsiveness and reliability.