Study: DB vs binary snapshots for world-state persistence #23
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo#23
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Question
We currently persist state (player positions + inventory) via EF Core (SQLite dev / Postgres prod). For world state especially, is a relational DB the right tool, or would our own binary snapshot files be lighter/simpler/faster?
Why ask
docs/architecture.mdand chose EF for simplicity at our scale).To decide (critically, later)
IsoMmo.Assets/.isoa).Definition of Done
docs/architecture.md.Raised during the "playable among friends" work; deferred by decision to reason about it critically later.
Broaden the study: also evaluate removing the SQL/EF layer entirely and persisting everything to binary saves like ModernUO (periodic full/incremental world snapshots + append log), not just world-state. Cover:
Deliver a recommendation (keep SQL / go binary / hybrid) with the reasoning.
marco referenced this issue2026-07-18 04:44:37 +02:00
Study written:
docs/persistence-study.md(PR above). Summary: the World is already in-memory-first and we never query the game DB, so game state is a poor fit for normalized SQL (and pays a dual-provider migration on every change), while Auth stays genuinely relational. Options A (normalized SQL) / B (ModernUO binary) / C (blob-in-SQL). Recommendation: C — one row = id + versioned blob — kills the migration tax while keeping the DB's atomicity/backup/Postgres; B if a DB-less game state is a hard goal. Awaiting the decision to implement.