Summary
Replace 30-second polling with WebSocket-based real-time sync so all connected clients see changes instantly.
Current State
- Frontend polls
/api/notifications every 30 seconds
- Task changes are not visible to other users until next poll
- Notification bell updates with delay
Proposed Architecture
┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ ┌─────────────┐
│ Task │────►│ Dapr │────►│ WebSocket │────►│ All Connected
│ Changed │ │ PubSub │ │ Service │ │ Clients
└─────────────┘ └─────────────┘ └─────────────────┘ └─────────────┘
Implementation Steps
Acceptance Criteria
Technical Notes
- Consider Socket.IO for easier client management
- May need sticky sessions or Redis adapter for horizontal scaling
- Dapr subscription can directly call WebSocket service
Labels
enhancement learning event-driven phase-v2
📚 Learning Goal: Event-driven real-time architecture
Summary
Replace 30-second polling with WebSocket-based real-time sync so all connected clients see changes instantly.
Current State
/api/notificationsevery 30 secondsProposed Architecture
Implementation Steps
task-eventstopic via Dapr PubSubAcceptance Criteria
Technical Notes
Labels
enhancementlearningevent-drivenphase-v2📚 Learning Goal: Event-driven real-time architecture