LuminariMUD Event-Driven Core

LuminariMUD Event-Driven Core An architecture diagram generated by Archify. Sockets + Pipes · clients, bridges, AI · Architecture component Sockets + Pipes clients, bridges, AI I/O Reactor · libevent or select() · main thread - all gameplay mutation I/O Reactor libevent or select() game_loop() · one pass per wakeup · main thread - all gameplay mutation game_loop() one pass per wakeup Interpreter · commands run directly · main thread - all gameplay mutation Interpreter commands run directly Game Code · combat, magic, handler · main thread - all gameplay mutation Game Code combat, magic, handler Domain Event Bus · sealed typed facts · main thread - all gameplay mutation Domain Event Bus sealed typed facts Fact Subscribers · quests, activities, NPCs · main thread - all gameplay mutation Fact Subscribers quests, activities, NPCs Game Scheduler · 5 x 64 timing wheel · main thread - all gameplay mutation Game Scheduler 5 x 64 timing wheel Runtime Services · named cadences · main thread - all gameplay mutation Runtime Services named cadences Owner Events · NPCs, periodic, affects · main thread - all gameplay mutation Owner Events NPCs, periodic, affects readiness wakeup input lines ACMD() committed facts typed handlers wake owners due batch cadence owner callbacks behavior main thread - all gameplay mutation Legend Frontend Backend Message bus External

Four boundaries (ADR 0002)

  • • Reactor: readiness + next deadline
  • • Scheduler: timed work per owner
  • • Domain events: facts after commit
  • • Interpreter: commands run directly

Bounded by design

  • • Callback and time budget per pass
  • • Fact chains cap at depth 16
  • • Extraction cancels owned events

Evidence

  • • docs/adr/0002 event-driven core
  • • Snapshot: master @ 0bc67f2
  • • Compare: heartbeat delta map