RSX internal system lessons
This is the internal system series, written for engineers of the CDK. The dev_coder course follows application code.
These eight films follow a canister's data from its owning module to its storage. The closing pair covers enhanced orthogonal persistence through the SDK's guarded KEEP lifecycle and explicit migration of retained heap data. Each lesson.md is a working script and storyboard. Its narration blocks, read in order, are the voiceover. The surrounding directions tell the animator what is in frame, where to point, and which spoken phrase starts each change.
The series player has the finished films, chapter navigation, captions, and transcripts.
| Film | Worked example |
|---|---|
| 1. Store: One Root, Private Memory | Shop creates branch 9 and attaches its private Inventory memory. |
| 2. Store: Inside a Bound Service | The same Shop uses transient Rust services to quote, tax, and sell three units in one actor scope. |
| 3. Nyxus: Inside the Retained Heap | A native retained allocation grows while Runtime and Nyxus draw from the same Wasm page provider. |
| 4. Hylix: From Stable Bytes to Records | An attached Hylix record leads into a worked WorkingSet read, repeated access, and flush. |
| 5. Minima: Inside a Stable Block | A fixed-width vector read follows the descriptor into Minima-owned stable blocks. |
| 6. Collections: One Lookup, Three Layouts | The same hit and miss travel through the native, offset-backed, and frozen map layouts in the Minima benchmark fixture. |
| 7. KEEP: Upgrading the Canister, Keeping the Heap | The populated nested Nyxus probe changes executable code under the same memory contract. |
| 8. Store: Inside a Heap Migration | That probe delegates a V1-to-V2 conversion through its owners, and a late trap rolls the upgrade back. |
Shared visual language
Use the light paper, restrained color, small title, and source-code balloons from the Rechain, Reactor, and Takt films. Keep one drawing for each component. A close-up moves the camera into that drawing. The wide view uses the same geometry. Workspace teaching and style guide
| What the viewer is following | Drawing |
|---|---|
| Canister and actor root | A solid canister boundary encloses an actor root and its ownership tree. The root uses the same MemoryModule cell as its children. |
| Private memory and attachment | Each MemoryModule has distinct Data and Children compartments. A solid attachment edge starts at the parent's child slot or map entry and ends at the child cell boundary. A small MemoryKey badge in the Data compartment marks owner access. |
| Transient service and call | Place a service box outside the owned tree inside the canister. A fine connector ending in a circle shows its nonowning binding. A solid arrow carries a synchronous call, with the call written on the moving pill. |
| Physical storage access | Place Wasm main memory and IC stable memory in labeled bands beneath the owner cells. Begin pointers and offsets at their real carriers. A moving byte span represents a copy into a buffer or back to stable storage. |
| Explanation | Use PauseAndExplain with a dashed leader to an exact slot, field, edge, or guard. Leave space for the balloon above it. Narration and the balloon continue while the camera and machinery hold. Resume from the held frame. |
Reuse MemoryModule and the existing Shop layout, and carry the CatalogFingerprint and CatalogGate geometry into both upgrade films. The existing native page, span, slot, Hylix block, working set, and B-tree node drawings give the storage films their close-ups. Drive their state from the example named in the new lesson. Memory modules and Catalog · Storage drawings · PauseAndExplain
The Shop stays in the same layout in films 1 and 2. The shared stable provider probe anchors the Hylix and Minima compositions, and the nested Nyxus probe stays in the same layout in films 7 and 8. When the narration introduces a different fixture, cut to its own starting state and reuse the component drawings. Shop · Shared stable provider probe · Nested Nyxus probe
Editing the drafts
- Read the narration blocks straight through. Check that each new term has a visible referent and each sentence advances the worked example.
- Walk the beats with the narration muted. At each cue the focus target should be in frame, the cause should precede its effect, and the next beat should inherit the visible result.
- Trace the values, ownership edges, and outcomes against the linked code and test assertions. Keep illustrative layouts labeled in the production notes. Native tests establish the behavior they exercise, and the PocketIC fixtures establish the lifecycle cases they assert.
- Keep scene and beat IDs stable through wording edits. Update a quoted cue when its spoken phrase changes. Set frame boundaries after generating narration and checking the time needed for motion and holds.
The source links target the adjacent ../newstack checkout, based on d8e99603848d87935b776cdce73b6c2a213aa0c6 when these scripts were drafted. RSX memory architecture · Engine guide