Yicong-Huang opened a new issue, #5431: URL: https://github.com/apache/texera/issues/5431
### Task Summary Three engine files push WebSocket events by reaching into web's `SessionState.getAllSessionStates.foreach(_.send(...))`: - `amber/clustering/ClusterListener.scala` — `ClusterStatusUpdateEvent(numWorkerNodesInCluster)` - `amber/engine/architecture/controller/Controller.scala` — `RegionUpdateEvent(regions)` - `amber/engine/architecture/scheduling/RegionExecutionCoordinator.scala` — `RegionStateEvent(region.id.id, phase.toString)` Define an engine-side `.proto` (`amber/src/main/protobuf/org/apache/texera/amber/engine/events/engineevents.proto`) with case classes `ClusterSizeChanged`, `RegionsUpdated`, `RegionPhaseChanged`. Engine code publishes via Pekko `system.eventStream.publish(...)` instead of writing to `SessionState`. A new web-side actor subscribes to those classes and translates each one to the corresponding existing `TexeraWebSocketEvent` subclass (`ClusterStatusUpdateEvent` / `RegionUpdateEvent` / `RegionStateEvent`) before pushing into `SessionState`. The wire format on the WebSocket itself does not change — the JSON contract with the frontend stays as is; only the engine→web hop becomes a typed proto contract. Part of #5424. ### Task Type - [x] Refactor / Cleanup -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
