Skip to content

Conversation

@sai-kumar-peddireddy
Copy link
Collaborator

@sai-kumar-peddireddy sai-kumar-peddireddy commented Nov 20, 2025

Description

  • HealthService: Implemented a singleton HealthService to handle health events (e.g., ping -> pong) using a decoupled Broadcaster interface.
  • SystemHandler: Implemented a singleton SystemHandler to handle system events (e.g., client-id) using a decoupled Broadcaster interface.
  • Optimized Routing: Refactored handleClientMessage to avoid double-marshalling. It now performs partial parsing of the header and passes the raw []byte payload directly to handlers via RouteMessageCmd.
  • Type Safety: Enforced usage of constants.EventType throughout the system
  • Testing: Added comprehensive unit tests for HealthService, SystemHandler, and Client (Reader/Writer/Handler), significantly improving code coverage.

closes #319

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have run tests that prove my fix is effective or that my feature works
  • I have updated the CHANGELOG.md file accordingly

…y, and Optimized Routing

- HealthService: Implemented a singleton HealthService to handle health events (e.g., ping -> pong) using a decoupled Broadcaster interface.
- SystemHandler: Implemented a singleton SystemHandler to handle system events (e.g., client-id) using a decoupled Broadcaster interface.
- Optimized Routing: Refactored handleClientMessage to avoid double-marshaling. It now performs partial parsing of the header and passes the raw []byte payload directly to handlers via RouteMessageCmd.
- Centralized Dispatch: Enhanced the Hub's handler registry to use a map-based set for automatic deduplication and O(1) lookups.
- Type Safety: Enforced usage of constants.EventType throughout the system
- Testing: Added comprehensive unit tests for HealthService, SystemHandler, and Client (Reader/Writer/Handler), significantly improving code coverage.
@sai-kumar-peddireddy sai-kumar-peddireddy force-pushed the msg-routing-from-websock-client branch from 10dbe86 to 264e3fe Compare November 20, 2025 15:29
@sai-kumar-peddireddy sai-kumar-peddireddy merged commit 40253ad into main Nov 20, 2025
15 checks passed
@sai-kumar-peddireddy sai-kumar-peddireddy deleted the msg-routing-from-websock-client branch November 20, 2025 15:33
@github-project-automation github-project-automation bot moved this from 📋 Awaiting Triage to ✅ Done in Parallels DevOps Service Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Tests

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

[PBI] Websocket Event Emitter for API

3 participants