Skip to content

Commit

Permalink
add streamed events to visualization (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
dyc3 authored Mar 18, 2024
1 parent 16e6194 commit 652c9b7
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
26 changes: 26 additions & 0 deletions figures/vis/vis-collector-component.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@startuml

package ott_collector {
component ServiceDiscovery
component Collector
component EventBus

component Rocket {
database SystemState
}
}

package ott_balancer
package ott_vis_datasource

ServiceDiscovery --> Collector: Informs
ServiceDiscovery ..> ott_balancer: Discovers
Collector --> SystemState: Builds
Collector --> ott_balancer: Polls
Collector --> EventBus: Feeds
EventBus <-- Rocket: Uses to serve /state/stream
Rocket --> SystemState: Uses to serve /state
ott_vis_datasource ..> SystemState: Polls for
ott_vis_datasource ..> EventBus: Streams from

@enduml
1 change: 1 addition & 0 deletions figures/vis/vis-collector-component.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions visualization-design.typ
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,14 @@ The custom panel will be structured as shown in @Figure::panel-internal-class. I
image("figures/vis/panel-internal-class.svg", height: 80%),
caption: "Class diagram of the custom Grafana panel, showing it's internal structure."
) <Figure::panel-internal-class>

== Streamed Events

The visualization will be able to recieve streamed events from the balancers for realtime updates of the visualization. The collector is responsible for recieving these events and passing them to the datasource via websockets. The panel will then update the visualization accordingly. @Figure::vis-collector-component shows how the collector interacts with the visualization.

Check warning on line 264 in visualization-design.typ

View workflow job for this annotation

GitHub Actions / typos

"recieve" should be "receive".

Check warning on line 264 in visualization-design.typ

View workflow job for this annotation

GitHub Actions / typos

"recieving" should be "receiving".

#figure(
image("figures/vis/vis-collector-component.svg"),
caption: [Component diagram showing the internal components of the collector and how they interact with the rest of the system.]
) <Figure::vis-collector-component>

In the Balancer, events are sourced directly from the Balancer's logs via a `Layer` from the `tracing` crate.

0 comments on commit 652c9b7

Please sign in to comment.