Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Increase stability and performance of publishing workflow definition #5373

Open
raymonddenhaan opened this issue May 13, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@raymonddenhaan
Copy link
Contributor

Enhancement Request

The current way of updating the activityRegistry is prone to errors, especially in a distributed environment

Enhancement Overview

Recreating the entire activityRegistry on (almost) every change of a workflowdefinition creates a lot of overhead and race conditions can occur when the activityRegistry is cleared. Resulting in instances in which the activtyRegistry is not up-to-date and resulting in more errors.

Proposed Enhancement

Instead of the entire recreation of the activityRegistry only the workflowDefinition of the event is added or deleted. To ensure the registry being up-to-date the entire list will be refreshed when an activity can not be found in the registry.

@raymonddenhaan raymonddenhaan added the enhancement New feature or request label May 13, 2024
Copy link

glime-ai bot commented May 13, 2024

To address the enhancement request regarding the updating of the activityRegistry in Elsa Workflows, especially in a distributed environment, the proposed enhancement suggests a more incremental approach to updating the registry. Instead of recreating the entire activityRegistry on every change of a workflow definition, which can lead to overhead and race conditions, the enhancement proposes that only the specific workflow definition affected by an event should be added or deleted from the registry. Additionally, to maintain the registry's accuracy, a full refresh of the list would be triggered when an activity cannot be found in the registry.

This approach aims to reduce errors and ensure that the activityRegistry remains up-to-date without the need for constant full recreation. It would likely involve changes to the underlying code that manages the activityRegistry, ensuring that it can handle incremental updates and refreshes as needed.

Implementing this enhancement would require a careful review of the current implementation of the activityRegistry, as well as the development and testing of the new incremental update logic. It would be important to ensure that this change does not introduce new issues or negatively impact the performance of the system.

If you are experiencing specific issues with the activityRegistry in your current setup, or if you have further questions about implementing this enhancement, please provide more details so that we can assist you more effectively.

This comment was generated by Glime.

@raymonddenhaan raymonddenhaan self-assigned this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant