-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Labels
P3Priority Level 3Priority Level 3
Description
Previously we made a decision to use polling to retrieve workflows and executions, but there are many drawbacks for implementing workflow/execution updates on the client side.
My rationale
When a workflow is triggered, AVS handles a single execution at a time. After the trigger finishes, the resulting event or data is appended to a queue. However, the Studio currently retrieves the entire queue during polling and recalculates it to identify the single item that has changed.
This process could be significantly simplified if we push the single event directly to the Studio.
Advantages of Push-based updates
- Simplified process:
- The Studio backend can host a single WebSocket connection to AVS, subscribing to different channels as needed.
- A secret key can be used to secure the connection and project different channels.
- Event-specific channels, which could include
- Workflow events: Creation, cancellation, deletion, or status changes (e.g., “Completed”).
- Execution events: Start of an execution, success, or error outcomes.
Drawbacks of polling on the client side of Studio
- Finding a single object or status change from an array is error0prone. If any attribute of workflow or execution change, the code would need to update. It’d be much better if we can push the single event from AVS to user directly.
- The tranverse of array is costly on cilent side. If not handled carefully, it will cause re-render of some or all page components slowing down the workflow page, especially if polling occurs every few seconds.
- Although polling works in the beginnning, the number of API calls will add up quickly with a short interval for every user.
Overall, the User Notification feature of the Studio depends on this AVS feature.
Metadata
Metadata
Assignees
Labels
P3Priority Level 3Priority Level 3