{
  "docVersion": 1,
  "id": "template-htap-live-dashboards",
  "name": "HTAP — live dashboards",
  "purpose": "OLTP row-store primary replicates into a columnar replica; incremental view maintenance keeps materialized aggregates fresh; dashboards query views with bounded staleness.",
  "nodes": {
    "users": {
      "type": "users",
      "label": "Customers",
      "x": 0,
      "y": 240,
      "runtime": "transactions"
    },
    "app": {
      "type": "k8s",
      "label": "Order Service",
      "x": 260,
      "y": 240,
      "runtime": "OLTP writes",
      "patterns": [
        "stateless",
        "autoscale"
      ]
    },
    "oltp": {
      "type": "database",
      "label": "Primary (row store)",
      "x": 520,
      "y": 240,
      "w": 170,
      "runtime": "point reads/writes",
      "color": "blue",
      "patterns": [
        "replicated",
        "backup"
      ],
      "notes": "Optimized for small transactions. A single analyst GROUP BY here can evict the working set — hence the replica."
    },
    "col": {
      "type": "columnar",
      "label": "Analytics Replica",
      "x": 810,
      "y": 240,
      "runtime": "columnar · seconds behind",
      "color": "purple",
      "notes": "Same data, column layout: scans touch only queried columns. Staleness is bounded and visible."
    },
    "ivm": {
      "type": "worker",
      "label": "View Maintainer",
      "x": 810,
      "y": 470,
      "runtime": "applies deltas to views"
    },
    "views": {
      "type": "warehouse",
      "label": "Materialized Views",
      "x": 1070,
      "y": 470,
      "runtime": "revenue/min · funnel steps"
    },
    "dash": {
      "type": "dashboard",
      "label": "Exec Dashboards",
      "x": 1330,
      "y": 240,
      "runtime": "sub-second loads"
    }
  },
  "edges": {
    "e1": {
      "from": "users",
      "to": "app",
      "fromSide": "right",
      "toSide": "left",
      "label": "orders",
      "animated": true
    },
    "e2": {
      "from": "app",
      "to": "oltp",
      "fromSide": "right",
      "toSide": "left",
      "label": "txns",
      "animated": true
    },
    "e3": {
      "from": "oltp",
      "to": "col",
      "fromSide": "right",
      "toSide": "left",
      "label": "replication",
      "style": "dashed",
      "animated": true,
      "patterns": [
        "ordered"
      ]
    },
    "e4": {
      "from": "col",
      "to": "ivm",
      "fromSide": "bottom",
      "toSide": "top",
      "label": "change deltas",
      "style": "dashed"
    },
    "e5": {
      "from": "ivm",
      "to": "views",
      "fromSide": "right",
      "toSide": "left",
      "label": "incremental apply",
      "patterns": [
        "idempotent"
      ]
    },
    "e6": {
      "from": "views",
      "to": "dash",
      "fromSide": "top",
      "toSide": "bottom",
      "label": "read views"
    },
    "e7": {
      "from": "col",
      "to": "dash",
      "fromSide": "right",
      "toSide": "left",
      "label": "ad-hoc scans · bounded staleness"
    }
  },
  "boxes": {
    "b1": {
      "x": 770,
      "y": 120,
      "w": 560,
      "h": 520,
      "label": "analytics side — zero load on the primary",
      "color": "purple",
      "opacity": 0.04
    }
  },
  "texts": {
    "t1": {
      "x": 0,
      "y": 450,
      "text": "IVM in one line: revenue_per_min += delta,\nnot SELECT SUM() over everything, every refresh.\nfreshness gets cheap when updates are incremental.",
      "color": "green",
      "size": 12
    }
  },
  "meta": {
    "createdAt": "2026-07-13T09:00:00.000Z",
    "modifiedAt": "2026-07-13T09:00:00.000Z"
  }
}