DalaDev.ClusterViz (dala_dev v0.2.0)

Copy Markdown View Source

Cluster visualization for dala Elixir nodes.

Provides web-based dashboard with D3.js graphs for:

  • Cluster topology visualization
  • Node health dashboard
  • Process distribution visualization
  • LiveView message flow diagram
  • Real-time metrics (memory, reductions, message queue)

Integrates with dala.server to serve the dashboard.

Summary

Functions

Generate HTML dashboard page.

Generate node health dashboard data.

Generate LiveView message flow data.

Generate process distribution visualization data.

Generate cluster topology data.

Types

node_info()

@type node_info() :: %{
  node: node(),
  status: :alive | :unreachable,
  memory: map(),
  reductions: integer(),
  process_count: integer(),
  message_queue_len: integer(),
  latency_ms: integer() | nil
}

Functions

generate_dashboard(opts \\ [])

@spec generate_dashboard(keyword()) :: {:ok, :started} | {:error, term()}

Generate HTML dashboard page.

Options:

  • :port - Server port (default: 4000)
  • :refresh_interval - Auto-refresh interval in ms (default: 5000)

health_dashboard()

@spec health_dashboard() :: {:ok, map()} | {:error, term()}

Generate node health dashboard data.

Returns a map with per-node metrics.

liveview_flow()

@spec liveview_flow() :: {:ok, map()} | {:error, term()}

Generate LiveView message flow data.

Returns a map with message flow between processes.

process_distribution()

@spec process_distribution() :: {:ok, map()} | {:error, term()}

Generate process distribution visualization data.

Returns a map with:

  • :supervisors - Supervision tree structure
  • :processes - Process list with stats

topology()

@spec topology() :: {:ok, map()} | {:error, term()}

Generate cluster topology data.

Returns a map with:

  • :nodes - List of node information
  • :connections - List of {node1, node2} tuples
  • :timestamp - Current timestamp