latlng

Durable logs and recovery behavior.

Use AOF for the runnable server when durability matters. Keep the default safe fsync behavior unless measured workload data points to tuning the writer queue or group commit settings.

Storage modes

Memory

Ephemeral, process-local storage for development and disposable workloads.

AOF

Append-only file storage with replay, compaction, integrity verification, backup, and restore tooling.

SQLite

Embedded/native storage backend. The runnable server currently exposes memory and AOF storage modes.

AOF operations

latlng-cli aof-verify ./data/appendonly.aof
latlng-cli aof-backup ./data/appendonly.aof ./backup/appendonly.backup.json
latlng-cli aof-restore ./backup/appendonly.backup.json ./restore/appendonly.aof

aof-backup is an offline tool. Use it against a stopped server or a copied AOF that is no longer being written. For live systems, prefer graceful shutdown or crash-consistent filesystem snapshots followed by verification.

Recovery guarantees

  • Replay keeps the valid prefix when the final frame is truncated.
  • Complete corrupt payloads fail startup with a codec error.
  • Truncated final batches are ignored as one unit, preserving command-plus-webhook atomicity.
  • Startup replay is incremental, so the core applies entries as they are read.
  • Expirations are persisted as absolute deadlines so restart and AOFSHRINK do not extend TTLs.