Skip to content

feat(ws): implement real-time WebSocket live weather pushes and STOMP feed integration - #43

Merged
podlLev merged 14 commits into
devfrom
feature/websocket
Aug 2, 2026
Merged

podlLev merged 14 commits into
devfrom
feature/websocket

Conversation

@podlLev

@podlLev podlLev commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Overview

This PR introduces real-time, event-driven weather updates via WebSocket and STOMP messaging. By replacing static polling with scheduled server-sent pushes, live weather data is dynamically broadcast to active UI components across both dashboard and forecast views.


Key Changes

  • Build & Configuration Setup:

    • Dependencies: Added Spring WebSocket and Project Reactor dependencies to support reactive/event-driven message flows.
    • Scheduling: Enabled Spring @EnableScheduling support to power background live weather push jobs.
  • WebSocket & STOMP Message Infrastructure:

    • Endpoint Security: Configured a secure STOMP endpoint supporting authenticated handshake Interceptors.
    • Data Transfer Objects: Created specialized request and push DTO payloads tailored for dashboard cards and forecast views.
    • Subscription Lifecycle Registry: Built an active subscription registry to process incoming STOMP frame subscriptions, manage client channels, and perform automatic cleanup on socket disconnection.
    • Scheduled Broadcasts: Implemented scheduled broadcast services to push fresh weather updates periodically to active subscribers.
  • Frontend UI Real-Time Integration:

    • Shared STOMP Client: Created a centralized frontend WebSocket/STOMP client instance for unified feed management.
    • Dynamic View Wiring: Connected real-time push streams directly into dashboard cards and forecast UI components for live DOM updates without full page reloads.
  • Testing & Validation Coverage:

    • Added targeted unit and integration tests covering socket controllers, subscription registries, forecast/dashboard live update pipelines, background schedulers, and overall WebSocket configuration logic.

@podlLev podlLev self-assigned this Aug 2, 2026
@podlLev podlLev added feature New features, fresh endpoints, or user-facing functionality test Adding unit tests, web slice tests, or integration suites performance Optimization changes (e.g., lazy loading, caching, SQL tuning) labels Aug 2, 2026
@podlLev
podlLev merged commit 8de62b8 into dev Aug 2, 2026
2 checks passed
@podlLev
podlLev deleted the feature/websocket branch August 2, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features, fresh endpoints, or user-facing functionality performance Optimization changes (e.g., lazy loading, caching, SQL tuning) test Adding unit tests, web slice tests, or integration suites

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant