When an SQL Database Makes a Great Pub/Sub
There’s a perspective that the transaction log of a typical RDBMS is the canonical form and the rows & tables merely the event-sourced projection. After all, if you replay the former, you should always get exactly the same in the latter.It’s curious that over those projections, we then build event stores for CQRS/ES systems with their own projections mediated by application code.Let’s also mention the journaled filesystem on which the database logs reside. And the log structure that your SSD is using internally to balance writes.It’s been a long time since we wrote an application event stream linearly straight to media, and although I appreciate the separate concerns that each of these layers addresses, I’d probably struggle to justify them from first principles to even a slightly more Socratic version of myself.