⚡AgentSkills
⚙️ Backend Engineering · Distributed Systems

Adopt event sourcing without the graveyard mistakes

Command/event separation, upcasting discipline, and projection rebuild strategies that survive year three.

advanced~45 minBackend EngineersAPI DevelopersPlatform Engineers

Steps

  1. 1Store commands' resulting EVENTS as truth; never store mutable state alongside
  2. 2Version events immutably; upcast old versions at read boundaries only
  3. 3Build projections as disposable rebuilds from the stream — test rebuilds regularly
  4. 4Snapshot aggressively enough that replays don't take hours
  5. 5Keep event payloads primitively typed; rich behavior belongs in handlers
  6. 6Answer 'why did state change' queries from streams — that's the payoff

Common Pitfalls

  • ▲Events named after tables (UserUpdated) carrying no business meaning
  • ▲Schema changes editing history instead of adding versions

Commands

Install with skills CLI
$ npx skills add aniruddhaadak80/skills --skill distributed-systems-event-sourcing-pragmatics
Install globally
$ npx skills add aniruddhaadak80/skills --skill distributed-systems-event-sourcing-pragmatics -g

Tags

#event-sourcing#architecture#cqrs#backend-engineering#distributed-systems

Related skills

Strong vs bounded-staleness vs eventual mapped to business harm scenarios, not fashion.

⚙️ Backend Engineering·~45m

Residency, replication lag, failover semantics, and write-conflict strategy before the second region exists.

⚙️ Backend Engineering·~50m