evennia-shards
Making split deployment a config option in Evennia.
A drop-in extension to Evennia that adds optional split deployment and horizontal sharding via configuration alone. Install it and the game runs as vanilla Evennia. Flip a config setting and the same code runs as a split deployment (auth process separate from game process). Flip another, and it runs as full multi-shard.
Status: working MVP, not production-ready. Phase 1 (router + shards, ticket auth, IC/OOC redirects, cross-shard character + inventory move, chargen, primitive cross-shard messaging) is functionally complete and live-smoke-verified end-to-end. Persistent scripts are confined to the shard or roles they are declared for. 346 tests green. The library is in use by its first consumer game — FullCircleMUD, running router plus shards with
evennia-world-builderandevennia-mob-spawnerco-installed. See docs/progress.md for the running milestone log; docs/INDEX.md is the design wiki.
What this is
A small, additive enhancement library. Three modes are selected per Evennia process via a single config setting:
monolith(default) — single process does everything. The library is dormant; you get vanilla Evennia.router— auth front door. OwnsAccountDB, runs login and the OOC menu, redirects players to a shard via single-use tickets on@ic.shard— game world. Loads its slice of the world, accepts ticket-based session attaches from the router or other shards.
The library does not impose its own room or character base classes — it provides infrastructure (per-row shard partition enforced via the django-multitenant auto-filter, cross-shard character move, ticket auth, message-bus primitives) and lets the consumer game keep its own typeclasses.
What this is not
- Not a fork of Evennia. The library imports from upstream Evennia; Evennia stays untouched.
- Not a parallel Evennia distribution.
- Not a "rewrite your stack to scale" project.
- Not a multi-region, multi-database, or multi-datacenter design.
- Not a solution for "what if we had millions of players" — that is explicitly deferred.
The design is scoped to the single-Postgres era: from one Evennia process today through however many shards run against a single, vertically scaled Postgres. The working theory is that Evennia's per-process bottleneck is its single-threaded Twisted reactor — game logic, ticks, scripts, and player commands all share one thread — while Postgres handles concurrent connections and aggregate load comfortably. Horizontal scaling for Evennia therefore means adding Evennia processes, not databases; a single vertically scaled Postgres should absorb the load of many shards before its own limits bite. We haven't benchmarked at scale, and "many" is qualitative — if a real game pushes through that frontier, the architectural assumptions here will need revisiting. Scoping to single-Postgres keeps the design surface small in the meantime. See the archived handover for the original positioning statement and out-of-scope list.
Install
pip install evennia-shards
Editable install for development against a checkout:
git clone https://github.com/FullCircleMUD/evennia-shards.git
cd evennia-shards
python -m venv venv
# Activate the venv (platform-specific)
pip install -e .
python runtests.py
Quick start
The repo ships three demo gamedirs under examples/ — demo_router, demo_shard0, demo_shard1 — that exercise the library end-to-end on a single machine.
Each demo gamedir runs as its own Evennia process with its own settings.py declaring its SHARDS_ROLE and SHARD_ID. See examples/README.md for the run-three-processes recipe.
Documentation
All technical documentation lives in docs/. Start at docs/INDEX.md for the doc map and reading paths.
Notable entry points:
- docs/INDEX.md — map of all design documents.
- docs/progress.md — running log of milestones with links to evidence (test results, design docs, code changes).
- docs/archive/evennia-shards-HANDOVER.md — the original brainstorm session that started this project. Archived as historical context; current decisions extend and refine it.
- CLAUDE.md — instructions for LLM agents working in this repo.
Project relationships
This library was extracted from scaling work originally done for the FullCircleMUD (FCM) project. FCM is its first consumer game and depends on the library today. The library is deliberately game-agnostic; FCM-specific concerns stay in FCM. See the origin section of the archived handover for the original rationale.
License
BSD 3-Clause — see LICENSE. Same family as Evennia's license.
Contributing
Not yet open to outside contributions. The library is in use by its first consumer game; once the API has settled through that use, contribution guidelines will be added.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evennia_shards-0.1.3.tar.gz.
File metadata
- Download URL: evennia_shards-0.1.3.tar.gz
- Upload date:
- Size: 113.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4502067ac1a98beb2af9b9f907ce155c373ad13c278fbe9cff0e2c49e1b6493f
|
|
| MD5 |
04053bd58be04077c397cb4b905df96f
|
|
| BLAKE2b-256 |
1460bb6d112c84818bbbf216c7fccaa45fac02d8c2bd139b6be7e78ea1588763
|
File details
Details for the file evennia_shards-0.1.3-py3-none-any.whl.
File metadata
- Download URL: evennia_shards-0.1.3-py3-none-any.whl
- Upload date:
- Size: 123.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39183676b9b8f56d351f649dad18598d941c783f7f398cc69f5f11b6d5826e32
|
|
| MD5 |
009771328525dfc365228950977a5afb
|
|
| BLAKE2b-256 |
ffadae22d6faeaf867403677a356151bf5096ce62125fb916182159978ebef23
|