111 points · by CmdrDats · 11y ago · 33 comments
That is the best description of the problem event sourcing tries to solve that I have seen. Short and to the point.
Huh. I always thought that the problem event sourcing was trying to solve was more that modeling complex interactive systems through their static state rather than modeling the interactions directly as the principal domain objects is invariably futile. While "we're dropping all sorts of interesting data on the ground" may be one manifestation of that, I think the more common manifestation is "we bear too high of an expense when adapting our information system to changes in business process".
Now that actually makes sense to someone not already familiar with the context.
Can someone either explain, or point to a fuller explanation, of the purported problem?
CQRS: You have one "write" data-model which is specialized for transactions and applying business rules... and other "read" models that take care of things like dashboards, detailed information pages, searching, generating reports, etc.
Chronological events: A really handy way to propagate changes from the write-model into the various read-models.
Event-sourcing: This is "dogfooding" your own events. Instead of just emitting optional messages to other systems, you make them essential, and use them as the authoritative record for your own system's state. This adds certain kinds of flexibility that you may (or may not) need.
Having the eventstore separate means that you can keep Datomic focussed at what it's really good at. When you find good aggregate views for your events, you can scan through old events and populate Datomic.
This separation also means that you can make the events as rich and plentiful as you want without burdening Datomic with stuff that you don't have a good way to query anyhow.
For example of I have a 'make_user_preferred' event, I just transact the database and then add any metadata I need to the Datomic transaction.
Datomic is Event Sourcing if you create a realized version of your database on every event. It is just smart about it and keeps diffs.
I still don't understand.
The transaction log, in datomic, can be queried as easily as you would query the rest of the data. The view exists on the client. Changes are already queued by the transactor. And, changes are pushed to the clients from the transactor.
In certain cases you can definitely put the events directly into the transactions. In our case, it's just not the right fit and I suspect that many others will find the same constraints apply.
Want to live in Austin, TX and build a data platform from the ground up? We're hiring:
https://careers.stackoverflow.com/jobs/80205/senior-develope...