KUMA
Entity-Native Storage Engine for the BEAM v0.1
One entity. One actor. One writer. No conflicts. Ever.
Event Sourced
Every state change is an immutable event. Full audit trail. Time-travel debugging. Replay from any point.
Actor Per Entity
Each entity gets its own OTP process. Single writer guarantees zero conflicts. Pure message passing.
SQLite Shards
Entities shard across multiple SQLite databases by consistent hashing. Parallel writes. No bottleneck.
GDPR Native
Entity-scoped storage makes right-to-erasure trivial. Delete one entity, all events gone. Crypto-shredding built in.
Clustering
Built on BEAM distribution. Entities auto-migrate between nodes. Self-healing. Scale by adding nodes.
Projections
Subscribe to event streams. Build read-optimized views. Eventual consistency by design. Rebuild anytime.
import kuma
import kuma/entity
pub fn main() {
// Boot the storage engine
let store = kuma.start(
"./data",
shards: 16,
)
// Spawn an entity actor
let user = entity.spawn(
store,
id: "user_0x9A4F",
)
// Append events (single writer)
entity.append(user, UserCreated(
name: "Dwighson",
role: "architect",
))
// Read current state (<1ms)
let state = entity.read(user)
// => User("Dwighson", "architect")
} Real-Time Systems
Chat applications, live collaboration, multiplayer game state. Each user is an entity with instant reads.
Financial Ledgers
Account balances, transaction history, audit compliance. Immutable event log with crypto-shredding for privacy.
IoT & Edge
Device state management at scale. Each sensor is an entity. SQLite shards keep data local and fast.