vizmatic 0.3.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PROMPT.md +75 -525
- package/README.md +87 -578
- package/ROADMAP.md +49 -67
- package/SCIENCE.md +250 -0
- package/assets/THIRD_PARTY_LICENSES.md +40 -1
- package/assets/fonts/InstrumentSerif-Italic.ttf +0 -0
- package/assets/fonts/InstrumentSerif-Regular.ttf +0 -0
- package/assets/licenses/raster-codecs-MIT.txt +74 -0
- package/dist/chunk-3F2VQ7NW.js +1 -0
- package/dist/chunk-4XE64I2U.js +755 -0
- package/dist/chunk-JHHPLALU.js +79 -0
- package/dist/chunk-LTX44BAE.js +112 -0
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/chunk-PSBF4TEK.js +1 -0
- package/dist/chunk-RPAHMKAR.js +605 -0
- package/dist/chunk-RWF4VBUL.js +3617 -0
- package/dist/chunk-WHT6HRMX.js +4201 -0
- package/dist/cli.js +371 -10
- package/dist/index.cjs +11129 -2922
- package/dist/index.d.cts +1225 -369
- package/dist/index.d.ts +1225 -369
- package/dist/index.js +6220 -3015
- package/dist/math-LXB4FH4E.js +7 -0
- package/dist/math-QVCETQDQ.js +1 -0
- package/dist/scene-browser-assets.d.ts +38 -0
- package/dist/scene-browser-assets.js +53 -0
- package/dist/scene-browser-chunks/chunk-5MVLYGXM.js +70 -0
- package/dist/scene-browser-chunks/chunk-ASXKN3NU.js +1 -0
- package/dist/scene-browser-chunks/chunk-CM5Y5LZP.js +1 -0
- package/dist/scene-browser-chunks/chunk-DP7NB4EW.js +6 -0
- package/dist/scene-browser-chunks/emscripten-module.browser-M5AEKJGE.js +1 -0
- package/dist/scene-browser-chunks/ffi-FL6ORJU3.js +1 -0
- package/dist/scene-browser-chunks/module-ES6BEMUI-JD5S5VKR.js +1 -0
- package/dist/scene-browser-chunks/module-asyncify-2EFITU5U-HWPFJFJC.js +1 -0
- package/dist/scene-browser-chunks/scene-browser-layout-M3XSXMV4.js +27 -0
- package/dist/scene-browser.d.ts +117 -0
- package/dist/scene-browser.js +220 -0
- package/dist/scene-cli.d.ts +1 -0
- package/dist/scene-cli.js +4 -0
- package/dist/scene-runtime.cjs +995 -0
- package/dist/scene-runtime.d.cts +81 -0
- package/dist/scene-runtime.d.ts +81 -0
- package/dist/scene-runtime.js +22 -0
- package/dist/server-2FYHZ4UO.js +331 -0
- package/dist/stage-browser/browser.d.ts +2482 -0
- package/dist/stage-browser/chunk-SQE76S5B.js +1 -0
- package/dist/stage-browser/chunk-VZNL6JY2.js +59 -0
- package/dist/stage-browser/dagre.esm-N2NIVIAZ.js +6 -0
- package/dist/stage-browser/math-4WFNHVV2.js +18 -0
- package/dist/stage-browser/stage.js +19 -0
- package/dist/stage-export.cjs +4950 -0
- package/dist/stage-export.d.cts +112 -0
- package/dist/stage-export.d.ts +112 -0
- package/dist/stage-export.js +544 -0
- package/dist/stage.cjs +9745 -0
- package/dist/stage.d.cts +1678 -0
- package/dist/stage.d.ts +1678 -0
- package/dist/stage.js +5404 -0
- package/dist/svg-import-Djj2q7Pc.d.cts +742 -0
- package/dist/svg-import-Djj2q7Pc.d.ts +742 -0
- package/dist/video-CcHW1qhV.d.cts +532 -0
- package/dist/video-CcHW1qhV.d.ts +532 -0
- package/examples/README.md +18 -0
- package/examples/agent-pipeline.tsx +4 -4
- package/examples/animated-pipeline.tsx +1 -5
- package/examples/attention-head.tsx +12 -12
- package/examples/aurora-incident.tsx +4 -3
- package/examples/building-blocks.tsx +8 -9
- package/examples/catalog-charts.tsx +4 -4
- package/examples/catalog-content.tsx +7 -9
- package/examples/catalog-convolution-kernel.tsx +116 -0
- package/examples/catalog-data.tsx +2 -8
- package/examples/catalog-dataflow.tsx +5 -9
- package/examples/catalog-dense.tsx +80 -0
- package/examples/catalog-deployment.tsx +5 -11
- package/examples/catalog-diagrams.tsx +13 -16
- package/examples/catalog-drawing.tsx +7 -7
- package/examples/catalog-flows.tsx +4 -4
- package/examples/catalog-foundations.tsx +11 -11
- package/examples/catalog-gaussian-blur.tsx +146 -0
- package/examples/catalog-image-tensors.tsx +115 -0
- package/examples/catalog-ml.tsx +36 -31
- package/examples/catalog-numeric-matrices.tsx +93 -0
- package/examples/catalog-photo-blur.tsx +209 -0
- package/examples/catalog-science-ai.tsx +130 -0
- package/examples/catalog-science-chemistry.tsx +103 -0
- package/examples/catalog-science-math.tsx +93 -0
- package/examples/catalog-science-physics.tsx +84 -0
- package/examples/catalog-sequence.tsx +59 -38
- package/examples/data-pipeline-lineage-presentation.tsx +5 -0
- package/examples/data-pipeline-lineage.tsx +85 -0
- package/examples/daybreak-launch.tsx +1 -0
- package/examples/desired-quadrant.tsx +7 -8
- package/examples/engineering-dashboard-presentation.tsx +13 -0
- package/examples/engineering-dashboard.tsx +160 -0
- package/examples/engineering-flow.tsx +2 -4
- package/examples/eval-dashboard.tsx +6 -6
- package/examples/films/attention.ts +278 -0
- package/examples/films/cache-miss.ts +431 -0
- package/examples/films/catalog.json +132 -0
- package/examples/films/central-limit.ts +269 -0
- package/examples/films/complex-maps.ts +273 -0
- package/examples/films/deck-example.ts +224 -0
- package/examples/films/euler-circle.ts +179 -0
- package/examples/films/fourier-epicycles.ts +265 -0
- package/examples/films/gradient-descent.ts +345 -0
- package/examples/films/linear-maps.ts +175 -0
- package/examples/films/lorenz.ts +207 -0
- package/examples/films/pythagoras.ts +185 -0
- package/examples/films/taylor-series.ts +159 -0
- package/examples/films/vizmatic-title.ts +117 -0
- package/examples/llm-serving-stack-presentation.tsx +5 -0
- package/examples/llm-serving-stack.tsx +94 -0
- package/examples/model-garden.tsx +1 -0
- package/examples/model-router.tsx +6 -6
- package/examples/nccl-all-gather.tsx +3 -3
- package/examples/nccl-all-reduce.tsx +3 -3
- package/examples/nccl-all-to-all.tsx +1 -1
- package/examples/nccl-broadcast.tsx +1 -1
- package/examples/nccl-reduce-scatter.tsx +5 -5
- package/examples/orthogonal-routing.tsx +4 -4
- package/examples/pareto-frontier.tsx +9 -10
- package/examples/presentation-frame.tsx +6 -6
- package/examples/pressure-mechanism.scene.json +14 -0
- package/examples/production-system-map-presentation.tsx +5 -0
- package/examples/production-system-map.tsx +130 -0
- package/examples/rag-graph.tsx +7 -7
- package/examples/release-card.tsx +5 -5
- package/examples/spec-anatomy.tsx +5 -5
- package/examples/system-architecture.tsx +19 -32
- package/examples/theme-system.tsx +1 -1
- package/examples/token-matrix.tsx +4 -2
- package/examples/transparent-badge.tsx +1 -2
- package/examples/videos/README.md +62 -0
- package/examples/videos/calculus-tangent.tsx +101 -0
- package/examples/videos/catalyst-pathway.tsx +56 -0
- package/examples/videos/causal-attention.tsx +91 -0
- package/examples/videos/convolution-kernel.tsx +34 -0
- package/examples/videos/gaussian-blur.tsx +32 -0
- package/examples/videos/image-to-matrix.tsx +22 -0
- package/examples/videos/matrix-multiplication.tsx +128 -0
- package/examples/videos/photo-gaussian-blur.tsx +39 -0
- package/examples/videos/request-lifecycle.tsx +99 -0
- package/examples/videos/signal-to-story.tsx +126 -0
- package/examples/videos/wave-interference.tsx +80 -0
- package/examples/vizmatic-bare.d.ts +1 -0
- package/examples/vizmatic-hero.tsx +9 -18
- package/examples/website-workflow.tsx +7 -7
- package/examples/weekend-field-notes.tsx +3 -2
- package/package.json +77 -12
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { getThemeColors, GraphDiagram, Scene, type ThemeMode } from 'vizmatic'
|
|
2
|
+
|
|
3
|
+
// A fictional inference platform. All figures are illustrative.
|
|
4
|
+
export const width = 2000
|
|
5
|
+
export const height = 1500
|
|
6
|
+
|
|
7
|
+
export function create(theme: ThemeMode = 'dark') {
|
|
8
|
+
const c = getThemeColors(theme)
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<Scene
|
|
12
|
+
c={c}
|
|
13
|
+
title="Serving a large language model at 2.4 billion tokens per hour"
|
|
14
|
+
subtitle="From an API request to a streamed token. Illustrative figures at peak. Prefill and decode run on separate pools, which share work through the KV cache."
|
|
15
|
+
background={c.bg}
|
|
16
|
+
>
|
|
17
|
+
<GraphDiagram
|
|
18
|
+
c={c}
|
|
19
|
+
ariaLabel="LLM serving stack from API gateway through routing, scheduling, prefill and decode GPU pools, to the streaming response"
|
|
20
|
+
direction="TB"
|
|
21
|
+
groupDirection="LR"
|
|
22
|
+
legend={[
|
|
23
|
+
{ label: 'request path', style: 'solid' },
|
|
24
|
+
{ label: 'telemetry and async', style: 'dashed' },
|
|
25
|
+
{ label: 'token stream', style: 'solid', tone: 'blue' },
|
|
26
|
+
{ label: 'near capacity', style: 'dot', tone: 'warm' },
|
|
27
|
+
]}
|
|
28
|
+
groups={[
|
|
29
|
+
{ id: 'api', label: 'API tier', detail: 'stateless', summary: '41k req/s' },
|
|
30
|
+
{ id: 'compute', label: 'Inference', detail: 'disaggregated', summary: '1,580 GPUs' },
|
|
31
|
+
{ id: 'response', label: 'Response', detail: 'streaming and accounting', summary: '2.4B tok/h' },
|
|
32
|
+
{ id: 'control', label: 'Control', detail: 'per-tenant', summary: 'p99 9 ms' },
|
|
33
|
+
{ id: 'prefill', parent: 'compute', label: 'Prefill pool', detail: 'throughput optimized', summary: '420 GPUs · 71%' },
|
|
34
|
+
{ id: 'decode', parent: 'compute', label: 'Decode pool', detail: 'latency optimized', summary: '1,160 GPUs · 83%' },
|
|
35
|
+
{ id: 'state', parent: 'compute', label: 'Shared state', summary: '3.4 PB/h' },
|
|
36
|
+
]}
|
|
37
|
+
nodes={[
|
|
38
|
+
{ id: 'clients', group: 'api', label: 'Clients', detail: 'SDK, batch, chat', icon: 'user', rows: [{ key: 'sessions', value: '1.8M' }, { key: 'streaming', value: '94%' }] },
|
|
39
|
+
{ id: 'gateway', group: 'api', label: 'API gateway', detail: 'HTTP/2, SSE', icon: 'gateway', status: 'ok', rows: [{ key: 'requests', value: '41k/s' }, { key: 'added p99', value: '3.1 ms' }, { key: 'open streams', value: '620k' }] },
|
|
40
|
+
{ id: 'auth', group: 'api', label: 'Auth and quota', detail: 'token bucket', icon: 'lock', status: 'ok', rows: [{ key: '429 rate', value: '0.7%' }, { key: 'tenants', value: '84k' }] },
|
|
41
|
+
{ id: 'safety', group: 'api', label: 'Input filter', detail: 'classifier', icon: 'firewall', status: 'ok', rows: [{ key: 'p99', value: '11 ms' }, { key: 'blocked', value: '0.02%' }] },
|
|
42
|
+
{ id: 'tokenizer', group: 'api', label: 'Tokenizer', detail: 'Rust, BPE', icon: 'code', status: 'ok', rows: [{ key: 'mean input', value: '3,180 tok' }, { key: 'p99', value: '1.4 ms' }] },
|
|
43
|
+
|
|
44
|
+
{ id: 'router', group: 'control', label: 'Model router', detail: 'version, region, tier', icon: 'network', status: 'ok', rows: [{ key: 'models', value: '14' }, { key: 'canary', value: '5%' }] },
|
|
45
|
+
{ id: 'scheduler', group: 'control', label: 'Scheduler', detail: 'prefix-aware', icon: 'layers', tone: 'blue', status: 'warn', metrics: [{ label: 'queue p99', value: '180', unit: 'ms', tone: 'warm', spark: [40, 44, 60, 58, 90, 120, 150, 180] }, { label: 'admitted', value: '98.6', unit: '%' }] },
|
|
46
|
+
{ id: 'autoscaler', group: 'control', label: 'Autoscaler', detail: 'prefill and decode', icon: 'chart', rows: [{ key: 'target', value: '85% GPU' }, { key: 'warm spare', value: '6%' }] },
|
|
47
|
+
|
|
48
|
+
{ id: 'prefillA', group: 'prefill', label: 'Prefill workers', detail: 'H200, batch 32', icon: 'server', status: 'ok', metrics: [{ label: 'GPU util', value: '71', unit: '%', bar: 0.71 }, { label: 'tok/s/GPU', value: '48k' }] },
|
|
49
|
+
{ id: 'embedA', group: 'prefill', label: 'Prefix hasher', detail: 'block 256 tok', icon: 'git', rows: [{ key: 'cache hit', value: '63%' }, { key: 'tokens saved', value: '1.5B/h' }] },
|
|
50
|
+
|
|
51
|
+
{ id: 'decodeA', group: 'decode', label: 'Decode workers', detail: 'B200, continuous batch', icon: 'server', tone: 'blue', status: 'warn', metrics: [{ label: 'GPU util', value: '83', unit: '%', bar: 0.83, tone: 'warm' }, { label: 'tok/s/GPU', value: '1,180' }] },
|
|
52
|
+
{ id: 'sampler', group: 'decode', label: 'Sampler', detail: 'structured output', icon: 'spark', rows: [{ key: 'TTFT p50', value: '240 ms' }, { key: 'TTFT p99', value: '1.3 s' }, { key: 'inter-token', value: '14 ms' }] },
|
|
53
|
+
|
|
54
|
+
{ id: 'kv', group: 'state', label: 'KV cache store', detail: 'RDMA, tiered', icon: 'cache', status: 'warn', rows: [{ key: 'memory', value: '88%', bar: 0.88 }, { key: 'transfer', value: '940 GB/s' }, { key: 'eviction', value: '12k/s', tone: 'warm' }] },
|
|
55
|
+
{ id: 'weights', group: 'state', label: 'Model weights', detail: 'safetensors', icon: 'bucket', rows: [{ key: 'size', value: '1.2 TB' }, { key: 'cold load', value: '48 s' }] },
|
|
56
|
+
|
|
57
|
+
{ id: 'output', group: 'response', label: 'Output filter', detail: 'streaming', icon: 'firewall', status: 'ok', rows: [{ key: 'added p99', value: '6 ms' }, { key: 'flagged', value: '0.04%' }] },
|
|
58
|
+
{ id: 'stream', group: 'response', label: 'Token stream', detail: 'SSE frames', icon: 'stream', tone: 'blue', rows: [{ key: 'output', value: '2.4B tok/h' }, { key: 'mean', value: '412 tok' }] },
|
|
59
|
+
|
|
60
|
+
{ id: 'metering', group: 'response', label: 'Metering', detail: 'usage events', icon: 'queue', rows: [{ key: 'events', value: '41k/s' }, { key: 'lag', value: '1.2 s' }] },
|
|
61
|
+
{ id: 'traces', group: 'response', label: 'Traces', detail: '1% sampled', icon: 'monitor', rows: [{ key: 'spans', value: '92k/s' }] },
|
|
62
|
+
{ id: 'evals', group: 'response', label: 'Online evals', detail: '0.1% of traffic', icon: 'check', rows: [{ key: 'pass rate', value: '97.4%' }, { key: 'regressions', value: '0' }] },
|
|
63
|
+
]}
|
|
64
|
+
edges={[
|
|
65
|
+
{ from: 'clients', to: 'gateway', label: '41k req/s' },
|
|
66
|
+
{ from: 'gateway', to: 'auth' },
|
|
67
|
+
{ from: 'auth', to: 'safety' },
|
|
68
|
+
{ from: 'safety', to: 'tokenizer' },
|
|
69
|
+
{ from: 'tokenizer', to: 'router', label: '130M tok/s' },
|
|
70
|
+
{ from: 'router', to: 'scheduler' },
|
|
71
|
+
{ from: 'autoscaler', to: 'scheduler', kind: 'async' },
|
|
72
|
+
{ from: 'scheduler', to: 'embedA' },
|
|
73
|
+
{ from: 'embedA', to: 'prefillA', label: '37% miss' },
|
|
74
|
+
{ from: 'prefillA', to: 'kv', label: 'KV write' },
|
|
75
|
+
{ from: 'kv', to: 'decodeA', label: 'KV read', emphasis: true },
|
|
76
|
+
{ from: 'scheduler', to: 'decodeA', label: 'slot' },
|
|
77
|
+
{ from: 'weights', to: 'prefillA', muted: true },
|
|
78
|
+
{ from: 'weights', to: 'decodeA', muted: true },
|
|
79
|
+
{ from: 'decodeA', to: 'sampler', tone: 'blue', emphasis: true },
|
|
80
|
+
{ from: 'sampler', to: 'output', tone: 'blue', emphasis: true, label: '670k tok/s' },
|
|
81
|
+
{ from: 'output', to: 'stream', tone: 'blue', emphasis: true },
|
|
82
|
+
{ from: 'stream', to: 'metering', kind: 'async' },
|
|
83
|
+
{ from: 'stream', to: 'traces', kind: 'async' },
|
|
84
|
+
{ from: 'traces', to: 'evals', kind: 'async' },
|
|
85
|
+
]}
|
|
86
|
+
annotations={[
|
|
87
|
+
{ target: 'scheduler', text: 'Queue time is the first signal of a capacity shortfall, ahead of GPU utilization.', tone: 'warm', width: 170 },
|
|
88
|
+
]}
|
|
89
|
+
/>
|
|
90
|
+
</Scene>
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export default create('dark')
|
|
@@ -7,8 +7,8 @@ height = 620;
|
|
|
7
7
|
direction="vertical"
|
|
8
8
|
connectorTone="cyan"
|
|
9
9
|
stages={[
|
|
10
|
-
{ title: 'Classify request', subtitle: 'cost + risk + latency',
|
|
11
|
-
{ title: 'Pick model', subtitle: 'small / reasoning / vision',
|
|
10
|
+
{ title: 'Classify request', subtitle: 'cost + risk + latency', width: 300 },
|
|
11
|
+
{ title: 'Pick model', subtitle: 'small / reasoning / vision', width: 300 },
|
|
12
12
|
{ title: 'Apply policy', subtitle: 'tools, budget, eval gates', tone: 'warm', width: 300 },
|
|
13
13
|
{ title: 'Observe result', subtitle: 'quality and drift', tone: 'green', width: 300 },
|
|
14
14
|
]}
|
|
@@ -16,11 +16,11 @@ height = 620;
|
|
|
16
16
|
<Column gap={14} width={560}>
|
|
17
17
|
<Row gap={12}>
|
|
18
18
|
<MetricCard tone="green" label="simple" value="72%" detail="sample route" width={170} />
|
|
19
|
-
<MetricCard
|
|
20
|
-
<MetricCard
|
|
19
|
+
<MetricCard label="hard" value="19%" detail="sample route" width={170} />
|
|
20
|
+
<MetricCard label="vision" value="9%" detail="sample route" width={170} />
|
|
21
21
|
</Row>
|
|
22
|
-
<CalloutCard
|
|
23
|
-
<CalloutCard tone="critical" title="Overflow check" detail="Validation reports clipped content before export." width={530}
|
|
22
|
+
<CalloutCard title="Policy as structured data" detail="Stages and metrics stay editable in the TSX source." width={530} />
|
|
23
|
+
<CalloutCard tone="critical" title="Overflow check" detail="Validation reports clipped content before export." width={530} filled={false} />
|
|
24
24
|
</Column>
|
|
25
25
|
</Row>
|
|
26
26
|
</Scene>
|
|
@@ -83,14 +83,14 @@ function Frame({ theme, progress, opacity = 1 }: { theme: ThemeMode; progress: n
|
|
|
83
83
|
const textColor = getReadableTextColor(color, c)
|
|
84
84
|
const p = clamp(progress)
|
|
85
85
|
const gather = clamp(p / 0.5)
|
|
86
|
-
const replicate = clamp((p - 0.
|
|
87
|
-
const inputOpacity = 1 - clamp((p - 0.
|
|
86
|
+
const replicate = clamp((p - 0.5) / 0.5)
|
|
87
|
+
const inputOpacity = 1 - clamp((p - 0.5) / 0.12)
|
|
88
88
|
const centerX = 548
|
|
89
89
|
const centerY = 181
|
|
90
90
|
const sourceX = 226
|
|
91
91
|
const outputX = 730
|
|
92
92
|
const labels = ['A', 'B', 'C', 'D']
|
|
93
|
-
const phase = p < 0.
|
|
93
|
+
const phase = p < 0.5 ? 'gather rank-owned shards' : p < 1 ? 'replicate ordered tensor' : 'A · B · C · D on every rank'
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
96
|
<div style={{ display: 'flex', position: 'relative', width, height, backgroundColor: c.bg, fontFamily: c.fontSans }}>
|
|
@@ -83,13 +83,13 @@ function Frame({ theme, progress, opacity = 1 }: { theme: ThemeMode; progress: n
|
|
|
83
83
|
const textColor = getReadableTextColor(color, c)
|
|
84
84
|
const p = clamp(progress)
|
|
85
85
|
const reduce = clamp(p / 0.5)
|
|
86
|
-
const broadcast = clamp((p - 0.
|
|
87
|
-
const inputOpacity = 1 - clamp((p - 0.
|
|
86
|
+
const broadcast = clamp((p - 0.5) / 0.5)
|
|
87
|
+
const inputOpacity = 1 - clamp((p - 0.5) / 0.12)
|
|
88
88
|
const centerX = 548
|
|
89
89
|
const centerY = 181
|
|
90
90
|
const sourceX = 226
|
|
91
91
|
const targetX = 850
|
|
92
|
-
const phase = p < 0.
|
|
92
|
+
const phase = p < 0.5 ? 'reduce matching values' : p < 1 ? 'broadcast completed sum' : 'same sum on every rank'
|
|
93
93
|
|
|
94
94
|
return (
|
|
95
95
|
<div style={{ display: 'flex', position: 'relative', width, height, backgroundColor: c.bg, fontFamily: c.fontSans }}>
|
|
@@ -100,7 +100,7 @@ function Frame({ theme, progress, opacity = 1 }: { theme: ThemeMode; progress: n
|
|
|
100
100
|
? 'exchange grid preserves source → destination'
|
|
101
101
|
: p < 0.88
|
|
102
102
|
? 'route chunks to destination ranks'
|
|
103
|
-
: p <
|
|
103
|
+
: p < 1
|
|
104
104
|
? 'pack by source within each destination'
|
|
105
105
|
: 'grouped by destination rank'
|
|
106
106
|
|
|
@@ -83,7 +83,7 @@ function Frame({ theme, progress, opacity = 1 }: { theme: ThemeMode; progress: n
|
|
|
83
83
|
const p = clamp(progress)
|
|
84
84
|
const sourceX = 226
|
|
85
85
|
const targetX = 850
|
|
86
|
-
const phase = p < 0.08 ? 'root buffer' : p <
|
|
86
|
+
const phase = p < 0.08 ? 'root buffer' : p < 1 ? 'fan-out copies' : 'replicated on every rank'
|
|
87
87
|
|
|
88
88
|
return (
|
|
89
89
|
<div style={{ display: 'flex', position: 'relative', width, height, backgroundColor: c.bg, fontFamily: c.fontSans }}>
|
|
@@ -85,8 +85,8 @@ function Frame({ theme, progress, opacity = 1 }: { theme: ThemeMode; progress: n
|
|
|
85
85
|
const gather = clamp(p / 0.46)
|
|
86
86
|
const collapse = clamp((p - 0.46) / 0.18)
|
|
87
87
|
const scatter = clamp((p - 0.64) / 0.36)
|
|
88
|
-
const inputOpacity = 1 - clamp((p - 0.
|
|
89
|
-
const resultOpacity = clamp((p - 0.
|
|
88
|
+
const inputOpacity = 1 - clamp((p - 0.64) / 0.14)
|
|
89
|
+
const resultOpacity = clamp((p - 0.64) / 0.14)
|
|
90
90
|
const centerX = 548
|
|
91
91
|
const centerY = 181
|
|
92
92
|
const outputX = 850
|
|
@@ -97,11 +97,11 @@ function Frame({ theme, progress, opacity = 1 }: { theme: ThemeMode; progress: n
|
|
|
97
97
|
const gridRowGap = 32
|
|
98
98
|
const phase = p < 0.12
|
|
99
99
|
? 'rank-local chunks'
|
|
100
|
-
: p < 0.
|
|
100
|
+
: p < 0.46
|
|
101
101
|
? 'align matching chunk indices'
|
|
102
|
-
: p < 0.
|
|
102
|
+
: p < 0.64
|
|
103
103
|
? 'reduce each chunk index'
|
|
104
|
-
: p <
|
|
104
|
+
: p < 1
|
|
105
105
|
? 'scatter one completed chunk per rank'
|
|
106
106
|
: 'partitioned reduced result'
|
|
107
107
|
|
|
@@ -12,13 +12,13 @@ height = 560;
|
|
|
12
12
|
routingClearance={18}
|
|
13
13
|
edgeGap={24}
|
|
14
14
|
nodes={[
|
|
15
|
-
{ id: 'gateway', label: 'Gateway', detail: 'separate channels', x: 0.12, y: 0.52,
|
|
16
|
-
{ id: 'security', label: 'Security', detail: 'reserved footprint', x: 0.50, y: 0.52, width: 190, height: 150,
|
|
15
|
+
{ id: 'gateway', label: 'Gateway', detail: 'separate channels', x: 0.12, y: 0.52, icon: 'gateway', ports: [{ id: 'read', side: 'right', offset: 0.25 }, { id: 'write', side: 'right', offset: 0.75 }] },
|
|
16
|
+
{ id: 'security', label: 'Security', detail: 'reserved footprint', x: 0.50, y: 0.52, width: 190, height: 150, icon: 'firewall' },
|
|
17
17
|
{ id: 'storage', label: 'Storage', detail: 'read / write API', x: 0.87, y: 0.52, tone: 'green', icon: 'database', ports: [{ id: 'read', side: 'left', offset: 0.25 }, { id: 'write', side: 'left', offset: 0.75 }, { id: 'retry', side: 'right' }, { id: 'resume', side: 'top' }] },
|
|
18
18
|
]}
|
|
19
19
|
edges={[
|
|
20
|
-
{ from: 'gateway', to: 'storage', fromPort: 'read', toPort: 'read', label: 'reads'
|
|
21
|
-
{ from: 'gateway', to: 'storage', fromPort: 'write', toPort: 'write', label: 'writes'
|
|
20
|
+
{ from: 'gateway', to: 'storage', fromPort: 'read', toPort: 'read', label: 'reads' },
|
|
21
|
+
{ from: 'gateway', to: 'storage', fromPort: 'write', toPort: 'write', label: 'writes' },
|
|
22
22
|
{ from: 'storage', to: 'storage', fromPort: 'retry', toPort: 'resume', label: 'retry', style: 'dashed', tone: 'warm' },
|
|
23
23
|
]}
|
|
24
24
|
/>
|
|
@@ -8,13 +8,12 @@ import {
|
|
|
8
8
|
export const width = 1040
|
|
9
9
|
export const height = 570
|
|
10
10
|
|
|
11
|
-
//
|
|
12
|
-
// Cost per task is each run's recorded/estimated total cost divided by 306 tasks.
|
|
11
|
+
// Illustrative values show how Pareto dominance separates score and cost tradeoffs.
|
|
13
12
|
const results = [
|
|
14
|
-
{ x: 0.
|
|
15
|
-
{ x: 0.
|
|
16
|
-
{ x: 0.
|
|
17
|
-
{ x: 0.
|
|
13
|
+
{ x: 0.01, y: 57, label: 'low cost', color: 'info', size: 7 },
|
|
14
|
+
{ x: 0.09, y: 72, label: 'balanced', color: 'positive', size: 7 },
|
|
15
|
+
{ x: 0.22, y: 89, label: 'high score', color: 'primary', size: 8 },
|
|
16
|
+
{ x: 0.32, y: 80, label: 'dominated', color: 'warning', size: 7 },
|
|
18
17
|
]
|
|
19
18
|
|
|
20
19
|
const formatCost = (value: number) => value < 0.01
|
|
@@ -38,21 +37,21 @@ export function create(theme: ThemeMode = 'dark') {
|
|
|
38
37
|
c={c}
|
|
39
38
|
width={960}
|
|
40
39
|
height={300}
|
|
41
|
-
title="
|
|
42
|
-
subtitle="A
|
|
40
|
+
title="Illustrative model score and cost tradeoffs"
|
|
41
|
+
subtitle="A point is efficient when no cheaper option scores at least as high"
|
|
43
42
|
points={results}
|
|
44
43
|
xScale="log"
|
|
45
44
|
xMin={0.006}
|
|
46
45
|
xMax={0.4}
|
|
47
46
|
yMin={50}
|
|
48
47
|
yMax={92}
|
|
49
|
-
xAxisLabel="
|
|
48
|
+
xAxisLabel="cost per task · log scale"
|
|
50
49
|
yAxisLabel="score"
|
|
51
50
|
formatX={formatCost}
|
|
52
51
|
formatY={(value) => `${Math.round(value)}%`}
|
|
53
52
|
frontierColor="positive"
|
|
54
53
|
goalLabel="more efficient ↖"
|
|
55
|
-
footer="
|
|
54
|
+
footer="Illustrative values · lower cost and higher score are preferred"
|
|
56
55
|
/>
|
|
57
56
|
</Scene>
|
|
58
57
|
)
|
|
@@ -3,21 +3,21 @@ height = 720;
|
|
|
3
3
|
|
|
4
4
|
<Scene title="TSX scene at slide size" subtitle="1280x720 output with the same primitives" gap={22}>
|
|
5
5
|
<Row gap={20} align="stretch">
|
|
6
|
-
<Panel title="Slide frame"
|
|
6
|
+
<Panel title="Slide frame" width={430} minHeight={330} justify="center">
|
|
7
7
|
<Column gap={13} align="stretch">
|
|
8
8
|
<TextLabel variant="label" text="Use a larger canvas." />
|
|
9
9
|
<TextLabel text="The same layout components work for article figures and slide-size assets." />
|
|
10
|
-
<CalloutCard
|
|
10
|
+
<CalloutCard title="Source remains TSX" detail="Edit content and layout in the frame file." align="left" />
|
|
11
11
|
</Column>
|
|
12
12
|
</Panel>
|
|
13
13
|
<Panel title="Renderer options" tone="green" width={610} minHeight={330} justify="center">
|
|
14
14
|
<Row gap={14} wrap align="stretch">
|
|
15
15
|
<MetricCard tone="green" label="Output" value="PNG/SVG" detail="2x by default" width={180} minHeight={106} />
|
|
16
|
-
<MetricCard
|
|
16
|
+
<MetricCard label="Layout" value="flex" detail="rows and columns" width={180} minHeight={106} />
|
|
17
17
|
<MetricCard tone="warm" label="Checks" value="overflow" detail="before export" width={180} minHeight={106} />
|
|
18
|
-
<MetricCard
|
|
19
|
-
<MetricCard
|
|
20
|
-
<MetricCard
|
|
18
|
+
<MetricCard label="Theme" value="tokens" detail="dark and light" width={180} minHeight={106} />
|
|
19
|
+
<MetricCard label="Runtime" value="Node" detail="no browser required" width={180} minHeight={106} />
|
|
20
|
+
<MetricCard label="Authoring" value="TSX" detail="editable source" width={180} minHeight={106} />
|
|
21
21
|
</Row>
|
|
22
22
|
</Panel>
|
|
23
23
|
</Row>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"width": 960,
|
|
3
|
+
"height": 540,
|
|
4
|
+
"duration": 8,
|
|
5
|
+
"fps": 30,
|
|
6
|
+
"theme": "dark",
|
|
7
|
+
"seed": 0,
|
|
8
|
+
"cues": {
|
|
9
|
+
"heat": 1,
|
|
10
|
+
"pressure": 3,
|
|
11
|
+
"release": 5.5
|
|
12
|
+
},
|
|
13
|
+
"source": "const heat = ease(cue('heat', 2));\nconst pressure = ease(cue('pressure', 2));\nconst release = easeOut(cue('release', 1.4));\nfunction Label({x,y,text,color=c.textPrimary,size=24}) { return <text x={x} y={y} fill={color} fontFamily='Inter' fontSize={size} textAnchor='middle'>{text}</text>; }\n<svg width={width} height={height} viewBox='0 0 960 540'>\n <rect width={960} height={540} fill={c.bg}/>\n <Label x={480} y={54} text='An animated mechanism, not a slide' size={32}/>\n <Label x={480} y={97} text='Heat → pressure → release' color={c.textSecondary} size={22}/>\n <rect x={360} y={165} width={240} height={240} rx={35} fill={c.bgCard} stroke={c.border} strokeWidth={3}/>\n <rect x={375} y={lerp(365,245,heat)} width={210} height={lerp(25,145,heat)} rx={20} fill={c.warning} opacity={0.25+heat*0.5}/>\n {Array.from({length:18},(_,i) => {const a=i*2.399; const r=35+(i%4)*17;return <circle key={i} cx={480+Math.cos(a+time*(0.15+heat*0.3))*r} cy={285+Math.sin(a+time*(0.15+heat*0.3))*r*(1-pressure*0.4)} r={5} fill={c.infoLight}/>;})}\n <g opacity={pressure*(1-release)}><VectorArrow x1={420} y1={285} x2={385} y2={285} color={c.warningLight}/><VectorArrow x1={540} y1={285} x2={575} y2={285} color={c.warningLight}/></g>\n <g transform={`translate(0 ${-release*25})`}><rect x={350} y={153} width={260} height={20} rx={10} fill={c.textSecondary}/></g>\n <g opacity={release}><VectorArrow x1={455} y1={230} x2={455} y2={115+release*5} color={c.infoLight}/><VectorArrow x1={505} y1={230} x2={505} y2={115+release*5} color={c.infoLight}/></g>\n <Label x={480} y={456} text={release>0.1?'Release changes the system':pressure>0.1?'Pressure rises inside the container':'Heat drives particle motion'} size={25}/>\n <rect x={180} y={487} width={600} height={5} rx={2} fill={c.border}/><rect x={180} y={487} width={600*progress} height={5} rx={2} fill={c.info}/>\n</svg>"
|
|
14
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { getThemeColors, GraphDiagram, Scene, type ThemeMode } from 'vizmatic'
|
|
2
|
+
|
|
3
|
+
// A fictional marketplace. All figures are illustrative.
|
|
4
|
+
export const width = 2600
|
|
5
|
+
export const height = 1700
|
|
6
|
+
|
|
7
|
+
const service = (rps: string, p99: string, replicas: string) => [
|
|
8
|
+
{ key: 'traffic', value: rps },
|
|
9
|
+
{ key: 'p99', value: p99 },
|
|
10
|
+
{ key: 'replicas', value: replicas },
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
export function create(theme: ThemeMode = 'dark') {
|
|
14
|
+
const c = getThemeColors(theme)
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<Scene
|
|
18
|
+
c={c}
|
|
19
|
+
title="Meridian marketplace, production system map"
|
|
20
|
+
subtitle="32 services and stores at weekday peak. Illustrative figures. Dashed links are asynchronous; the highlighted path is the checkout write path."
|
|
21
|
+
background={c.bg}
|
|
22
|
+
>
|
|
23
|
+
<GraphDiagram
|
|
24
|
+
c={c}
|
|
25
|
+
ariaLabel="Production system map of a marketplace across edge, commerce, payments, streaming, storage, and analytics"
|
|
26
|
+
direction="LR"
|
|
27
|
+
crossingBudget={24}
|
|
28
|
+
legend={[
|
|
29
|
+
{ label: 'synchronous', style: 'solid' },
|
|
30
|
+
{ label: 'asynchronous', style: 'dashed' },
|
|
31
|
+
{ label: 'checkout write path', style: 'solid', tone: 'blue' },
|
|
32
|
+
{ label: 'over SLO', style: 'dot', tone: 'warm' },
|
|
33
|
+
{ label: 'incident', style: 'dot', tone: 'red' },
|
|
34
|
+
]}
|
|
35
|
+
groups={[
|
|
36
|
+
{ id: 'clients', label: 'Clients', summary: '2.4M sessions' },
|
|
37
|
+
{ id: 'edge', label: 'Edge', detail: '14 PoPs', summary: '61k rps' },
|
|
38
|
+
{ id: 'commerce', label: 'Commerce', detail: 'us-east-1, eu-west-1', summary: '38k rps · 99.97%' },
|
|
39
|
+
{ id: 'pci', label: 'Payments', detail: 'PCI zone', summary: '1.9k rps · 99.99%' },
|
|
40
|
+
{ id: 'stream', label: 'Streaming', detail: 'Kafka 3.8', summary: '410 MB/s' },
|
|
41
|
+
{ id: 'stores', label: 'Stores', summary: '142 TB' },
|
|
42
|
+
{ id: 'analytics', label: 'Analytics', detail: 'hourly', summary: '6.1 PB' },
|
|
43
|
+
]}
|
|
44
|
+
nodes={[
|
|
45
|
+
{ id: 'web', group: 'clients', label: 'Web', detail: 'Next.js 15', icon: 'browser', rows: [{ key: 'sessions', value: '1.6M' }, { key: 'LCP p75', value: '1.9 s' }] },
|
|
46
|
+
{ id: 'mobile', group: 'clients', label: 'Mobile', detail: 'iOS, Android', icon: 'mobile', rows: [{ key: 'sessions', value: '780k' }, { key: 'crash free', value: '99.91%' }] },
|
|
47
|
+
{ id: 'partners', group: 'clients', label: 'Partner API', detail: 'REST, 212 keys', icon: 'code', rows: [{ key: 'traffic', value: '4.1k rps' }, { key: '4xx', value: '0.8%' }] },
|
|
48
|
+
|
|
49
|
+
{ id: 'cdn', group: 'edge', label: 'CDN', detail: 'cache hit 94%', icon: 'cloud', status: 'ok', rows: [{ key: 'egress', value: '48 Gb/s' }, { key: 'origin', value: '3.7k rps' }] },
|
|
50
|
+
{ id: 'waf', group: 'edge', label: 'WAF', detail: '2,140 rules', icon: 'firewall', status: 'ok', rows: [{ key: 'blocked', value: '1.2%' }, { key: 'added p99', value: '1.8 ms' }] },
|
|
51
|
+
{ id: 'gateway', group: 'edge', label: 'API gateway', detail: 'Envoy 1.31', icon: 'gateway', status: 'ok', rows: service('38k rps', '41 ms', '48') },
|
|
52
|
+
{ id: 'auth', group: 'edge', label: 'Identity', detail: 'OIDC, JWT', icon: 'lock', status: 'ok', rows: service('9.4k rps', '22 ms', '16') },
|
|
53
|
+
|
|
54
|
+
{ id: 'catalog', group: 'commerce', label: 'Catalog', detail: 'Go', icon: 'layers', status: 'ok', rows: service('14k rps', '31 ms', '36') },
|
|
55
|
+
{ id: 'search', group: 'commerce', label: 'Search', detail: 'Rust', icon: 'spark', status: 'warn', rows: service('6.2k rps', '184 ms', '28'), tags: ['SLO 150 ms'] },
|
|
56
|
+
{ id: 'cart', group: 'commerce', label: 'Cart', detail: 'Go', icon: 'container', status: 'ok', rows: service('5.1k rps', '27 ms', '18') },
|
|
57
|
+
{ id: 'checkout', group: 'commerce', label: 'Checkout', detail: 'Kotlin', icon: 'server', tone: 'blue', status: 'ok', rows: service('1.9k rps', '212 ms', '24'), spark: [38, 41, 44, 40, 52, 58, 61, 64, 60, 72, 69, 74] },
|
|
58
|
+
{ id: 'pricing', group: 'commerce', label: 'Pricing', detail: 'Java', icon: 'chart', status: 'ok', rows: service('8.8k rps', '18 ms', '20') },
|
|
59
|
+
{ id: 'inventory', group: 'commerce', label: 'Inventory', detail: 'Go', icon: 'stream', status: 'ok', rows: service('3.3k rps', '24 ms', '14') },
|
|
60
|
+
{ id: 'orders', group: 'commerce', label: 'Orders', detail: 'Kotlin', icon: 'file', tone: 'blue', status: 'ok', rows: service('2.0k rps', '64 ms', '18') },
|
|
61
|
+
|
|
62
|
+
{ id: 'payments', group: 'pci', label: 'Payments', detail: 'Kotlin', icon: 'tool', tone: 'blue', status: 'ok', rows: service('1.9k rps', '148 ms', '16') },
|
|
63
|
+
{ id: 'fraud', group: 'pci', label: 'Fraud scoring', detail: 'Python, XGBoost', icon: 'agent', status: 'ok', rows: service('1.9k rps', '38 ms', '12') },
|
|
64
|
+
{ id: 'ledger', group: 'pci', label: 'Ledger', detail: 'double entry', icon: 'database', tone: 'blue', status: 'ok', rows: service('2.6k tps', '12 ms', '6') },
|
|
65
|
+
{ id: 'psp', group: 'pci', label: 'Card networks', detail: 'external', icon: 'globe', status: 'idle', muted: false, rows: [{ key: 'auth rate', value: '96.4%' }, { key: 'p99', value: '1.1 s' }] },
|
|
66
|
+
|
|
67
|
+
{ id: 'events', group: 'stream', label: 'Order events', detail: '48 partitions', icon: 'queue', status: 'ok', rows: [{ key: 'in', value: '2.1k msg/s' }, { key: 'lag', value: '0.4 s' }] },
|
|
68
|
+
{ id: 'clicks', group: 'stream', label: 'Clickstream', detail: '256 partitions', icon: 'queue', status: 'error', rows: [{ key: 'in', value: '184k msg/s' }, { key: 'lag', value: '4m 12s' }], tags: ['consumer stalled'] },
|
|
69
|
+
{ id: 'notify', group: 'stream', label: 'Notifications', detail: 'email, push', icon: 'monitor', status: 'ok', rows: [{ key: 'sent', value: '310/s' }, { key: 'bounce', value: '0.3%' }] },
|
|
70
|
+
{ id: 'fulfil', group: 'stream', label: 'Fulfilment', detail: 'workers', icon: 'container', status: 'ok', rows: [{ key: 'jobs', value: '1.8k/s' }, { key: 'retries', value: '0.6%' }] },
|
|
71
|
+
|
|
72
|
+
{ id: 'pgorders', group: 'stores', label: 'Orders DB', detail: 'Postgres 16', icon: 'database', status: 'ok', rows: [{ key: 'size', value: '18 TB' }, { key: 'disk', value: '62%', bar: 0.62 }, { key: 'replica lag', value: '80 ms' }] },
|
|
73
|
+
{ id: 'pgledger', group: 'pci', label: 'Ledger DB', detail: 'Postgres 16', icon: 'database', status: 'ok', rows: [{ key: 'size', value: '6 TB' }, { key: 'disk', value: '41%', bar: 0.41 }, { key: 'replica lag', value: '12 ms' }] },
|
|
74
|
+
{ id: 'redis', group: 'stores', label: 'Session cache', detail: 'Redis 7', icon: 'cache', status: 'warn', rows: [{ key: 'hit rate', value: '97.2%' }, { key: 'memory', value: '88%', bar: 0.88 }] },
|
|
75
|
+
{ id: 'elastic', group: 'stores', label: 'Search index', detail: 'OpenSearch', icon: 'storage', status: 'warn', rows: [{ key: 'docs', value: '2.1B' }, { key: 'heap', value: '86%', bar: 0.86 }] },
|
|
76
|
+
{ id: 's3', group: 'stores', label: 'Media', detail: 'object store', icon: 'bucket', status: 'ok', rows: [{ key: 'size', value: '124 TB' }, { key: 'put', value: '2.2k/s' }] },
|
|
77
|
+
|
|
78
|
+
{ id: 'flink', group: 'analytics', label: 'Stream jobs', detail: 'Flink, 22 jobs', icon: 'stream', status: 'error', rows: [{ key: 'state', value: '1.4 TB' }, { key: 'checkpoint', value: 'failing' }] },
|
|
79
|
+
{ id: 'lake', group: 'analytics', label: 'Lakehouse', detail: 'Iceberg', icon: 'layers', status: 'ok', rows: [{ key: 'size', value: '6.1 PB' }, { key: 'freshness', value: '14 min' }] },
|
|
80
|
+
{ id: 'warehouse', group: 'analytics', label: 'Warehouse', detail: 'dbt, 1,420 models', icon: 'chart', status: 'ok', rows: [{ key: 'queries', value: '48k/day' }, { key: 'p95', value: '6.2 s' }] },
|
|
81
|
+
{ id: 'features', group: 'analytics', label: 'Feature store', detail: '310 features', icon: 'spark', status: 'ok', rows: [{ key: 'reads', value: '7.2k rps' }, { key: 'p99', value: '4 ms' }] },
|
|
82
|
+
]}
|
|
83
|
+
edges={[
|
|
84
|
+
{ from: 'web', to: 'cdn', label: '41 Gb/s' },
|
|
85
|
+
{ from: 'mobile', to: 'cdn', label: '7 Gb/s' },
|
|
86
|
+
{ from: 'web', to: 'waf' },
|
|
87
|
+
{ from: 'mobile', to: 'waf' },
|
|
88
|
+
{ from: 'partners', to: 'waf', label: '4.1k rps' },
|
|
89
|
+
{ from: 'cdn', to: 's3', muted: true },
|
|
90
|
+
{ from: 'waf', to: 'gateway', label: '38k rps' },
|
|
91
|
+
{ from: 'gateway', to: 'auth', label: '9.4k rps' },
|
|
92
|
+
{ from: 'auth', to: 'redis' },
|
|
93
|
+
{ from: 'gateway', to: 'catalog' },
|
|
94
|
+
{ from: 'gateway', to: 'search' },
|
|
95
|
+
{ from: 'gateway', to: 'cart' },
|
|
96
|
+
{ from: 'gateway', to: 'checkout', tone: 'blue', emphasis: true, label: '1.9k rps' },
|
|
97
|
+
{ from: 'catalog', to: 'pricing' },
|
|
98
|
+
{ from: 'cart', to: 'pricing' },
|
|
99
|
+
{ from: 'cart', to: 'redis' },
|
|
100
|
+
{ from: 'search', to: 'elastic', tone: 'warm', label: 'heap pressure' },
|
|
101
|
+
{ from: 'catalog', to: 's3', muted: true },
|
|
102
|
+
{ from: 'checkout', to: 'inventory' },
|
|
103
|
+
{ from: 'checkout', to: 'orders', tone: 'blue', emphasis: true },
|
|
104
|
+
{ from: 'checkout', to: 'payments', tone: 'blue', emphasis: true },
|
|
105
|
+
{ from: 'payments', to: 'fraud' },
|
|
106
|
+
{ from: 'payments', to: 'psp', label: '96.4% auth' },
|
|
107
|
+
{ from: 'payments', to: 'ledger', tone: 'blue', emphasis: true },
|
|
108
|
+
{ from: 'ledger', to: 'pgledger', tone: 'blue', emphasis: true },
|
|
109
|
+
{ from: 'orders', to: 'pgorders', tone: 'blue', emphasis: true },
|
|
110
|
+
{ from: 'orders', to: 'events', kind: 'async', label: '2.1k msg/s' },
|
|
111
|
+
{ from: 'inventory', to: 'events', kind: 'async' },
|
|
112
|
+
{ from: 'events', to: 'notify', kind: 'async' },
|
|
113
|
+
{ from: 'events', to: 'fulfil', kind: 'async' },
|
|
114
|
+
{ from: 'events', to: 'flink', kind: 'async' },
|
|
115
|
+
{ from: 'search', to: 'clicks', kind: 'async', label: '184k msg/s' },
|
|
116
|
+
{ from: 'clicks', to: 'flink', kind: 'async', tone: 'red', label: 'lag 4m' },
|
|
117
|
+
{ from: 'flink', to: 'lake' },
|
|
118
|
+
{ from: 'lake', to: 'warehouse' },
|
|
119
|
+
{ from: 'lake', to: 'features' },
|
|
120
|
+
]}
|
|
121
|
+
annotations={[
|
|
122
|
+
{ target: 'clicks', text: 'Consumer group stalled at 09:41 after a rebalance.', tone: 'red', width: 150 },
|
|
123
|
+
{ target: 'elastic', text: 'Heap above 85% since the 08:30 reindex.', tone: 'warm', width: 130 },
|
|
124
|
+
]}
|
|
125
|
+
/>
|
|
126
|
+
</Scene>
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export default create('dark')
|
package/examples/rag-graph.tsx
CHANGED
|
@@ -8,18 +8,18 @@ height = 560;
|
|
|
8
8
|
height={390}
|
|
9
9
|
nodeWidth={120}
|
|
10
10
|
nodes={[
|
|
11
|
-
{ id: 'query', label: 'Query', detail: 'user intent', x: 0.08, y: 0.52
|
|
12
|
-
{ id: 'rewrite', label: 'Rewrite', detail: 'search form', x: 0.30, y: 0.25
|
|
13
|
-
{ id: 'retrieve', label: 'Retrieve', detail: 'top-k docs', x: 0.52, y: 0.25
|
|
11
|
+
{ id: 'query', label: 'Query', detail: 'user intent', x: 0.08, y: 0.52 },
|
|
12
|
+
{ id: 'rewrite', label: 'Rewrite', detail: 'search form', x: 0.30, y: 0.25 },
|
|
13
|
+
{ id: 'retrieve', label: 'Retrieve', detail: 'top-k docs', x: 0.52, y: 0.25 },
|
|
14
14
|
{ id: 'rerank', label: 'Rerank', detail: 'cross-encoder', x: 0.72, y: 0.25, tone: 'warm' },
|
|
15
15
|
{ id: 'answer', label: 'Answer', detail: 'grounded draft', x: 0.94, y: 0.52, tone: 'green' },
|
|
16
16
|
{ id: 'verify', label: 'Verify', detail: 'citations', x: 0.52, y: 0.78, tone: 'critical' },
|
|
17
17
|
]}
|
|
18
18
|
edges={[
|
|
19
|
-
{ from: 'query', to: 'rewrite', label: 'normalize'
|
|
20
|
-
{ from: 'rewrite', to: 'retrieve', label: 'search'
|
|
21
|
-
{ from: 'retrieve', to: 'rerank', label: 'rank'
|
|
22
|
-
{ from: 'rerank', to: 'answer', label: 'context'
|
|
19
|
+
{ from: 'query', to: 'rewrite', label: 'normalize' },
|
|
20
|
+
{ from: 'rewrite', to: 'retrieve', label: 'search' },
|
|
21
|
+
{ from: 'retrieve', to: 'rerank', label: 'rank' },
|
|
22
|
+
{ from: 'rerank', to: 'answer', label: 'context' },
|
|
23
23
|
{ from: 'answer', to: 'verify', label: 'claims', tone: 'critical' },
|
|
24
24
|
{ from: 'verify', to: 'retrieve', label: 'retry', dashed: true, tone: 'warm' },
|
|
25
25
|
]}
|
|
@@ -6,25 +6,25 @@ height = 560;
|
|
|
6
6
|
<Panel title="Sample checks" tone="green" width={360}>
|
|
7
7
|
<Column gap={12} align="stretch">
|
|
8
8
|
<MetricCard tone="green" label="unit" value="418" detail="sample value" width="100%" />
|
|
9
|
-
<MetricCard
|
|
9
|
+
<MetricCard label="visual" value="12" detail="sample value" width="100%" />
|
|
10
10
|
<MetricCard tone="warm" label="bundle" value="42kB" detail="sample value" width="100%" />
|
|
11
11
|
</Column>
|
|
12
12
|
</Panel>
|
|
13
|
-
<Panel title="Sample trend"
|
|
13
|
+
<Panel title="Sample trend" width={360} justify="center">
|
|
14
14
|
<MiniBarChart
|
|
15
15
|
showValues
|
|
16
16
|
data={[
|
|
17
17
|
{ label: 'Mon', value: 8, tone: 'critical', valueLabel: '8' },
|
|
18
18
|
{ label: 'Tue', value: 6, tone: 'warm', valueLabel: '6' },
|
|
19
|
-
{ label: 'Wed', value: 4,
|
|
19
|
+
{ label: 'Wed', value: 4, valueLabel: '4' },
|
|
20
20
|
{ label: 'Thu', value: 2, tone: 'green', valueLabel: '2' },
|
|
21
21
|
{ label: 'Fri', value: 1, tone: 'green', valueLabel: '1' },
|
|
22
22
|
]}
|
|
23
23
|
/>
|
|
24
24
|
<TextLabel text="Illustrative issue count" align="center" />
|
|
25
25
|
</Panel>
|
|
26
|
-
<Panel title="Status"
|
|
27
|
-
<CalloutCard
|
|
26
|
+
<Panel title="Status" width={220} justify="center">
|
|
27
|
+
<CalloutCard title="Example only" detail="replace with project status" />
|
|
28
28
|
</Panel>
|
|
29
29
|
</Row>
|
|
30
30
|
</Scene>
|
|
@@ -3,7 +3,7 @@ height = 680;
|
|
|
3
3
|
|
|
4
4
|
<Scene title="Scene spec anatomy" subtitle="strong defaults with escape hatches" gap={18}>
|
|
5
5
|
<Row gap={18} align="stretch">
|
|
6
|
-
<Panel title="Spec fields"
|
|
6
|
+
<Panel title="Spec fields" width={420} align="center" justify="center">
|
|
7
7
|
<DataTable
|
|
8
8
|
firstColWidth={110}
|
|
9
9
|
cellWidth={210}
|
|
@@ -18,13 +18,13 @@ height = 680;
|
|
|
18
18
|
]}
|
|
19
19
|
/>
|
|
20
20
|
</Panel>
|
|
21
|
-
<Panel title="Render path"
|
|
21
|
+
<Panel title="Render path" width={520}>
|
|
22
22
|
<Flow
|
|
23
23
|
direction="vertical"
|
|
24
24
|
stages={[
|
|
25
|
-
{ title: 'Validate', subtitle: 'typed module or schema',
|
|
26
|
-
{ title: 'Compose', subtitle: 'React primitive tree',
|
|
27
|
-
{ title: 'Render', subtitle: 'Satori + resvg',
|
|
25
|
+
{ title: 'Validate', subtitle: 'typed module or schema', width: 430 },
|
|
26
|
+
{ title: 'Compose', subtitle: 'React primitive tree', width: 430 },
|
|
27
|
+
{ title: 'Render', subtitle: 'Satori + resvg', width: 430 },
|
|
28
28
|
{ title: 'Verify', subtitle: 'crop, contrast, overflow', tone: 'green', width: 430 },
|
|
29
29
|
]}
|
|
30
30
|
/>
|