by dwighson · 7mo ago · 0 comments
I've been doing DDD and event sourcing for years but always had to squeeze aggregates and domain events into Postgres tables. I kept looking at what scaling would mean with CockroachDB or ScyllaDB and it scared me. So I asked what happens if you just make SQLite the storage and let the BEAM handle concurrency, one actor per entity.
Turns out it works pretty well. 1.5M events/sec on an M1 in Docker with 5 cores. ScyllaDB on the same hardware does 49K. Written in Gleam, but there's a TypeScript SDK if you just want to use it from Node.
The clustering and rebalance coordinator are implemented and tested with multi-node BEAM peers, but I'll be honest, I haven't run it in a multi-server production deployment yet. Single-node with Litestream backup is what I'm running in production right now. Recovery from backup takes seconds, not minutes.
True multi-node HA is architecturally ready but not battle-tested at scale yet. v0.1.