Skip to content

Migrate runtime persistence to SQLite and add hot-bot load testing - #74

Merged
pmbstyle merged 4 commits into
mainfrom
agent/sqlite-hot-bot-load
Jul 25, 2026
Merged

Migrate runtime persistence to SQLite and add hot-bot load testing#74
pmbstyle merged 4 commits into
mainfrom
agent/sqlite-hot-bot-load

Conversation

@pmbstyle

Copy link
Copy Markdown
Owner

What changed

  • Migrates runtime persistence from MariaDB to an embedded SQLite database, including schema setup, migration tooling, server scripts, and operational documentation.
  • Keeps persistence writes buffered and adds SQLite-aware queue and checkpoint handling for character state.
  • Adds an isolated hot-bot load runner that provisions real bot characters, drives normal bot AI paths in shards, persists character state, and records AI, event-loop, database, and memory metrics.
  • Adds cache invalidation for real-player visibility so bot behavior updates immediately on player login or logout.

Why

The server should run without a separately installed database service while retaining observable, durable persistence. The load runner establishes a repeatable baseline for scaling the active bot population and catches database or scheduling regressions before they reach a live world.

Validation

  • npm test
  • Syntax check across 669 JavaScript files.
  • Isolated 10-minute soak with 500 hot bots: 1.1 million buffered persistence writes, zero database failures, 59 ms AI-tick p95, and 19 ms event-loop lag p95.

Current operating guidance

The hot AI and persistence path sustained 500 bots in isolation. Until the separate cold-population scheduler is further optimized under mixed live-world load, use 300 hot bots as the conservative production target and treat 400-500 as controlled capacity tiers.

@pmbstyle pmbstyle self-assigned this Jul 25, 2026
@pmbstyle
pmbstyle marked this pull request as ready for review July 25, 2026 22:01
@pmbstyle
pmbstyle merged commit 1d75c16 into main Jul 25, 2026
3 checks passed
@pmbstyle
pmbstyle deleted the agent/sqlite-hot-bot-load branch July 25, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant