Commit graph

2 commits

Author SHA1 Message Date
Akshay Sasidharan
131ff6a288 feat: Setup async workflow query execution with SSE
Overview
This PR implements real-time workflow execution monitoring using Server-Sent Events (SSE) as part of our LTS feature support. The implementation allows for tracking long-running workflows without requiring deployment changes.

Technical Changes
1. Server Components
Added WorkflowStreamService to manage persistent SSE streams with automatic cleanup
Implemented @sse endpoint in WorkflowExecutionsController for streaming status updates
Created WorkflowTriggersListener to emit workflow execution events with EventEmitter2
Added workflow execution status constants to identify different states in the execution lifecycle
2. Client-side Components
Implemented AsyncQueryHandler to manage SSE connections and parse event streams
Enhanced queryPanelSlice with methods to create async handlers and trigger workflows
Added support for non-blocking workflow execution with real-time status updates
3. Workflow Integration
Modified workflow triggering to use the SSE-based monitoring approach
Maintained same-server architecture to avoid deployment changes
Added automatic reconnection handling and error recovery for client connections
Architecture Decisions
Selected Same Server Approach: Chose to implement workflows within the same HTTP server to maintain the existing deployment setup for LTS users
Real-time Updates with SSE: Leveraged Server-Sent Events for their simplicity, efficiency, and compatibility with existing infrastructure
Future Extension Path: Implementation can be extended to Worker Threads or Microservice architecture later if needed
2025-07-01 19:17:07 +05:30
gsmithun4
269ec56455 Initial commit 2025-02-25 12:22:50 +05:30