# Rheo Livebooks

## Section

Welcome. These notebooks are a hands-on tour of **Rheo** — an embedded Elixir/OTP
library for **consumer groups** over a searchable event log.

You do not need to read HexDocs first. Start with Quickstart, then follow the
path that matches what you care about.

## How to run

Open this folder from a **clone of the repo** so notebooks can use the path
dependency (`{:rheo, path: ...}`). Hex `{:rheo, "~> 1.0"}` works for
standalone Livebook. Evaluate cells **top to bottom**.

```bash
livebook server notebooks/
# or jump straight in:
livebook server notebooks/quickstart.livemd
# ops surface:
livebook server notebooks/ops.livemd
# real LiveDashboard page via Phoenix Playground:
livebook server notebooks/live_dashboard.livemd
```

| Notebook                                                         | Story                                                       |
| ---------------------------------------------------------------- | ----------------------------------------------------------- |
| [Quickstart](quickstart.livemd)                                  | From zero to “I published, fetched, and ACKed an event” |
| [Concepts & Overview](concepts.livemd)                           | Why leases, groups, search, replay, and frontiers exist     |
| [Ops: inventory, lag, DLQ](ops.livemd)                           | Inspect APIs — list, health, dead letters                 |
| [LiveDashboard (Playground)](live_dashboard.livemd)              | Real `Rheo.LiveDashboard.Page` via Phoenix Playground       |
| [GenStage, Flow & Broadway](pipelines.livemd)                    | Rheo owns delivery; pipelines own topology                  |
| [ETS, Mnesia, Mongo, Redis, SQLite, PostgreSQL](backends.livemd) | Same API, different durability and ops trade-offs           |

**Docker?** Not for Quickstart, Concepts, Ops, LiveDashboard, or Pipelines
(they use ETS). The Backends notebook also runs Mnesia without Docker; Mongo /
Redis need `docker compose up -d`, Postgres needs `RHEO_POSTGRES_URL`.

## What Rheo is (and is not)

Rheo is **not** a message broker you deploy beside your app. It is a library you
supervise inside the BEAM: streams, groups, leases, and a portable query model
backed by a database (or ETS for tests).

Delivery is **at-least-once**. Handlers should be idempotent on `event.id`.

**v0.10+** adds inspect ops (`list_streams`, `group_info`, `dead_letters`, Mix
tasks, optional LiveDashboard) without a control plane — see
[ops.livemd](ops.livemd) and [ADR 027](https://hexdocs.pm/rheo/027-ops-surface.html).

**v0.9** added optional **Redis Streams** (`{:redix, "~> 1.5"}`) with Model C
receipts — same Consumer API as ETS/Mongo/Ecto.

Further reading: [Quick Start](https://hexdocs.pm/rheo/quick-start.html) ·
[Ops](https://hexdocs.pm/rheo/ops.html) ·
[0.9 → 0.10 migration](https://hexdocs.pm/rheo/0-9-to-0-10.html)
