ROADMAP: done items moved out of "Next" (codegen rewrite, SSR bridge, edge manifest, X-Mizan-Invalidate, return-type branching, affects_params, kernel extraction, two-stage codegen, mizan-ts). Real "Next" in: framework-adapter wrapper layer (MizanContext + useMizan + DjangoError on top of the kernel) for React/Vue/Svelte; A1–A4 from ISSUES.md. CLAUDE: 4-package layout replaced with the actual 7-package layered architecture (backend protocol adapters + frontend kernel + framework adapters + SSR worker). "STALE codegen" section rewritten to describe what's emitted vs. the wrapper layer that isn't yet. docs/ now tracked (6 files). AFI_ARCHITECTURE rewritten — replaced the speculative `mizan-ast`/`mizan-csr`/`mizan-rpc`/`mizan-schema` package names with the real layout, dropped KDL-schema language for the actual schema-export format. The other 5 docs/ files were already current and are tracked as-is. ARCHITECTURE-REWORK.md deleted — same expert review is re-tracked in the fresher ISSUES.md, two parallel trackers was sediment. README.md deleted — drift was beyond surgical fixes (`mizan_clients.py` convention, `<DjangoContext>` provider, removed `@compose` and `context='local'`, wrong codegen output filenames, 3-package structure vs. 7). Rewrite waits for the wrapper-layer codegen to land so user-facing examples reflect reality. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
39 lines
1.2 KiB
Markdown
39 lines
1.2 KiB
Markdown
# PSR vs Edge Delivery
|
|
|
|
Two distinct layers that prior conversations have conflated. They are
|
|
independent.
|
|
|
|
## PSR — Preemptive Static Rendering
|
|
|
|
**Protocol feature.** Render HTML on mutation, not on request.
|
|
|
|
Mechanism: `@client` fires mutation → backend adapter triggers local
|
|
render runtime → HTML stored locally.
|
|
|
|
Works on a $5 VPS with local Bun. **No Edge required.** PSR is part
|
|
of the protocol; it's available to every Mizan deployment regardless
|
|
of hosting.
|
|
|
|
## Edge Delivery — Mizan Render (Paid Product)
|
|
|
|
Pre-rendered HTML cached globally on Cloudflare CDN.
|
|
|
|
Uses `fetch()` to a render Worker on a separate domain
|
|
(`render.mizan.cloud`) instead of `cache.put()`, because Workers
|
|
Cache API is per-datacenter only. `fetch()` across zones goes through
|
|
the global CDN cache path with Tiered Cache.
|
|
|
|
This layer is the paid Mizan Render product.
|
|
|
|
## Caching modes
|
|
|
|
- **Public content** — preemptive (render on mutation)
|
|
- **User-scoped content** — reactive only (purge on mutation, render
|
|
on next request)
|
|
|
|
## Invariant
|
|
|
|
PSR logic must not couple to Cloudflare-specific APIs. PSR must work
|
|
without any cloud infrastructure. Edge delivery extends PSR; it does
|
|
not replace it.
|