Skip to content

feat(replace-websocket-with-sse): replace WebSocket with SSE#291

Merged
haiphucnguyen merged 1 commit intomainfrom
feature/replace-websocket-with-sse
Jan 20, 2026
Merged

feat(replace-websocket-with-sse): replace WebSocket with SSE#291
haiphucnguyen merged 1 commit intomainfrom
feature/replace-websocket-with-sse

Conversation

@haiphucnguyen
Copy link
Copy Markdown
Collaborator

  • Replaced WebSocket with Server-Sent Events (SSE) for real-time notifications.
  • Modified the security configuration to permit all GET requests to /sse/**.
  • Adjusted the notification event listeners to use the new SSE mechanism.
  • Updated the frontend to use the new useSSE hook instead of the previous useWebSocket hook.
  • Removed the @stomp/stompjs dependency from the frontend package.json as it's no longer needed.

This change improves the efficiency of real-time updates by using SSE, which keeps a single connection open and reuses it for all updates, instead of opening a new WebSocket connection for each update. This change also simplifies the security configuration by eliminating the need to manage WebSocket connections.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Jan 20, 2026

Deploying flowinquiry with  Cloudflare Pages  Cloudflare Pages

Latest commit: 69a608e
Status: ✅  Deploy successful!
Preview URL: https://d15b92cd.flowinquiry.pages.dev
Branch Preview URL: https://feature-replace-websocket-wi.flowinquiry.pages.dev

View logs

…Events

- Replaced WebSocket implementation with Server-Sent Events (SSE) for real-time notifications
- Updated backend to handle SSE connections and permissions
- Modified frontend to use new SSE hook instead of WebSocket hook
- Updated tests to reflect these changes
- Upgraded several dependencies in both frontend and backend
- Cleaned up some code and fixed minor bugs

This change provides a more efficient and reliable real-time communication mechanism, reducing the likelihood of dropped connections and missed notifications. It also simplifies the codebase by removing the need for WebSocket-specific code.
@haiphucnguyen haiphucnguyen force-pushed the feature/replace-websocket-with-sse branch from b1ba899 to 69a608e Compare January 20, 2026 18:42
@haiphucnguyen haiphucnguyen merged commit 6e4a717 into main Jan 20, 2026
9 of 10 checks passed
@haiphucnguyen haiphucnguyen deleted the feature/replace-websocket-with-sse branch January 20, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant