jargon

Comparison

Event sourcingvsStream-table duality

Event sourcing

you stop storing the current balance and instead store every deposit and withdrawal, deriving the balance by replaying them.

Persisting state as an ordered log of immutable events, with current state as a derived projection. You get a complete audit trail and the ability to rebuild any view by replaying history. What you give up is ad-hoc querying, cheap schema change, and the ability to ever delete anything easily — events are forever, including the ones with a bug in them.

Full entry →

Stream-table duality

the same topic can be read as a log of every change or collapsed into a table of current values, and which one you want depends on the question.

The observation that a table is the accumulated result of a stream of changes, and a stream is the sequence of differences between successive tables. It stops being an abstraction the first time you need current state from a change feed, or history from a snapshot table, and it is the idea behind compacted topics and materialised streaming views. Naming it is what makes 'should this be a table or a topic' answerable rather than stylistic.

Full entry →

Related comparisons