Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .agents/skills/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,14 @@ choosing which framework to use, start with **mz-test**.
| Skill | When to use | What it does |
|---|---|---|
| **mz-adapter-guide** | Working on or asking about the adapter layer | Correctness invariants and architectural notes for the coordinator, pgwire, peek paths, timestamp oracle, and related crates |

## Demos

| Skill | When to use | What it does |
|---|---|---|
| **mz-demo-data** | Standing up live, realistic data to show Materialize off | Builds continuously-updating synthetic data entirely in SQL, no Kafka or external load generator. Ships six domains (auctions, ecommerce, banking, IoT, clickstream, zoo) and a rubric for designing new ones |

Unlike the skills above, `mz-demo-data` is aimed at people evaluating
Materialize rather than developing it. Its assets live in `misc/demo-data/`,
with `.agents/skills/mz-demo-data` as a symlink, so the directory can be
lifted out on its own.
1 change: 1 addition & 0 deletions .agents/skills/mz-demo-data
50 changes: 50 additions & 0 deletions misc/demo-data/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# mz-demo-data

Continuously-updating, realistic synthetic data for Materialize demos —
generated entirely in SQL, no external load generator.

Based on [this blog post](https://github.com/frankmcsherry/blog/blob/master/posts/2024-05-19.md).

## Quickstart

```sh
PSQL="psql -p 6875 -h localhost -U materialize"

$PSQL -f assets/scaffold.sql # moments + random (24h window, 1s tick)
$PSQL -f assets/common/people.sql # shared 256-identity pool
$PSQL -f assets/domains/auctions.sql # or any other domain
```

Then in a psql session:

```sql
COPY (SUBSCRIBE (SELECT COUNT(*) FROM auctions) WITH (progress = true)) TO STDOUT;
```

To change the retention window or tick:

```sql
\set retention '6 hours'
\set tick '1 second'
\i assets/scaffold.sql
```

Teardown: `$PSQL -f assets/teardown.sql`.

## Domains

* **auctions** — marketplace; auctions with lifecycle and bids
* **ecommerce** — orders, line items, totals (joins shared `people`)
* **banking** — double-entry transactions; `SUM(balances) = 0` invariant
* **iot** — devices, readings, threshold alerts
* **clickstream** — sessions, page views, conversion funnel
* **zoo** — zoo visits, ratings, shipments; four invariants at once

Load more than one to see Materialize keep multiple data products in sync
over the same shared identity space.

## Designing a new domain

See [`SKILL.md`](SKILL.md). The short version: derive PKs from `moment`'s
random bytes, derive FKs by re-hashing the parent's bytes, control
distributions with byte masks, and bake an invariant into the construction.
Loading
Loading