6 ms·
Event Sourcing is a technical term, it's the idea that instead of mutating your database, you should instead have a log and insert a new log entry saying that y
by makmanalp 10y ago
Event Sourcing is a technical term, it's the idea that instead of mutating your database, you should instead have a log and insert a new log entry saying that you changed this value to that, etc. The idea is that this helps you do cool stuff like temporal queries (i.e. make a query "as the entire database looked like a month ago") or look at historical values and changes of things. This matters a lot in some fields. Of course then there's the matter of how to do this efficiently. You can build event sourcing on top of a regular RDBMS but if there is database-level support (as in PumpkinDB), then maybe some things are more efficient. Read more:
https://martinfowler.com/eaaDev/EventSourcing.html https://martinfowler.com/eaaDev/EventSourcing.html
- mattdeboard 10y agoThis sounds like my (probably wrong/incomplete) understanding of Datomic?
- grzm 10y agoI believe you could use Datomic for event sourcing, though it wasn't explicitly designed for the job and may not be the best choice depending on the requirements of your system as a whole. Bobby Calderwood at Capital One has a talk on a system which includes both event sourcing (using Kafka, IIRC) and Datomic: https://speakerdeck.com/bobbycalderwood/commander-better-distributed-applications-through-cqrs-event-sourcing-and-immutable-logs https://speakerdeck.com/bobbycalderwood/commander-better-dis...
- mattdeboard 10y agoNice, thank you.
- gritzko 10y agoVirtually every db works like that under the hood. They expose it differently, though. Kafka has nothing but log, for example.
- Groxx 10y agoe.g. https://dev.mysql.com/doc/refman/5.6/en/binary-log.html https://dev.mysql.com/doc/refman/5.6/en/binary-log.html
- solidsnack9000 10y agoThey do but it's usually not exposed in a useful way. Postgres once had this feature... https://www.postgresql.org/docs/6.3/static/c0503.htm https://www.postgresql.org/docs/6.3/static/c0503.htm
- anarazel 10y agoWe actually expose something to support event sourcing: https://www.postgresql.org/docs/current/static/logicaldecoding.html https://www.postgresql.org/docs/current/static/logicaldecodi... - although that's very different from the old time travel feature. Edit: missing word