garage44.eu/jeroen/cartopolis

logclone: git clone https://garage44.eu/jeroen/cartopolis.git

.. /docs/adr/011-static-world-replication-v0.md

raw

ADR-011: Static World Replication (v0)


Metadata:


Context

Problem: Clients need regions and prims from the authoritative store (ADR-002) without opening SQLite over the network (ADR-013).

Requirements:

Decision

Replicate static world as DTOs (RegionDto + PrimDto) over ADR-009: an initial WorldSnapshot { tick, regions, prims, avatars }, then small delta messages as edits occur.

As built (crates/cartopolis_core/src/protocol.rs):

Rationale

Primary Reasoning:

  1. Matches current data model: regions and prims already map to SQLite rows.
  2. Fast to ship: DTO snapshot is simpler than full component-attribute replication.
  3. Room to optimize: field-level sync can come later without blocking v0.

Alternatives Considered:

AlternativeProsConsRejected Because
Full EC-attribute replicationFine-grainedHuge spec + codeToo ambitious for v0
CRDT scene graphOffline-friendlyComplexityWrong problem for authoritative sim
Filesync assetsSimpleNot real-timeSeparate asset ADR later

Consequences

Positive:

Negative:

Related