direction: down

title: "Event Plane" {
  style.font-size: 36
  shape: text
  near: top-center
}

components: "Subscribers" {
  style.font-size: 28
  direction: right

  frontend: Frontend {
    style.font-size: 24
    shape: rectangle
  }
  router: Router {
    style.font-size: 24
    shape: rectangle
  }
  planner: Planner {
    style.font-size: 24
    shape: rectangle
  }
}

transport: "Transport (choose one)" {
  style.font-size: 32
  direction: right

  nats: "NATS Transport" {
    style.font-size: 28

    server: "NATS Server" {
      style.font-size: 22
      shape: cylinder
    }
    subjects: "Subject-scoped\npub/sub" {
      style.font-size: 22
      shape: text
    }
  }

  zmq: "ZMQ Transport" {
    style.font-size: 28

    sockets: "PUB/SUB\nSockets" {
      style.font-size: 22
      shape: rectangle
    }
    peer: "Peer-to-peer\n(no server)" {
      style.font-size: 22
      shape: text
    }
  }
}

workers: "Publishers" {
  style.font-size: 28
  direction: right

  w1: "Worker 1" {
    style.font-size: 24
    shape: rectangle
  }
  w2: "Worker 2" {
    style.font-size: 24
    shape: rectangle
  }
  w3: "Worker N" {
    style.font-size: 24
    shape: rectangle
  }
}

events: "Event Types" {
  style.font-size: 28
  direction: right

  kv: "KV Cache Events" {
    style.font-size: 22
    shape: rectangle
  }
  load: "Load Metrics" {
    style.font-size: 22
    shape: rectangle
  }
  seq: "Sequence Tracking" {
    style.font-size: 22
    shape: rectangle
  }
}

components -> transport: "subscribe" {
  style.font-size: 22
}
workers -> transport: "publish" {
  style.font-size: 22
}
events -> workers: "" {
  style.stroke-dash: 3
}
