Skip to content

[PBI] Move orchestrator to use Websockets for client hosts operations #321

@cjlapao

Description

@cjlapao

Description

At the moment we use a background function to monitor the host health and vms state change, this takes a bit of a toll on the network and will make the state of the vms not always. reporting the right state.
Now that we have a Websocket client available we need to move our old code to use the new system but we need to keep backward compatibility with hosts that are still not using the SSE.

What do we need?

  • Implement a listener that will connect to each host that is registered at start and listen to these changes
  • Implement a health check for the Websocket connection and use this to set the Online/Offline state of the host
  • Implement a check to understand if the client has the Websocket ability
  • Keep backwards compatibility falling trough to the old way if the client does not support Websocket or connection is blocked
  • Update the internal cache with the changes from the specific inbox
  • Make sure we tag the new hosts with a new property indicating the information is real time to inform UI

This is the last stage and we need to make sure we test it with multiple hosts in different stages with and without Websocket, this is important not to break compatibility

User Story

As a *user I want to be able to connect my Orchestrator to the real time information from the client host

Acceptance Criteria

  • We need to have Orchestrator consuming the new message
  • We need the Orchestrator to retry connections if they drop
  • We need the Orchestrator to be able to use both methods for backward compatibility
  • We need unit tests for this new functionality

Definition of Done

  • Code implemented following best practices.
  • Unit tests written and passing.
  • Code reviewed and approved.
  • Merged into the main branch.
  • Documentation updated (if applicable).
  • Deployed to staging/production environment.

Assumptions and Constraints

No response

Dependencies

No response

Additional Notes

No response

Metadata

Metadata

Assignees

Labels

pbiProduct Backlog ItemtriageSelected for triage

Type

Projects

Status

📋 Awaiting Triage

Relationships

None yet

Development

No branches or pull requests

Issue actions