Moshe Eshel
06/13/2023, 6:14 PMLucas Stephens
06/13/2023, 6:24 PMLucas Stephens
06/13/2023, 6:25 PMMoshe Eshel
06/13/2023, 6:31 PMLucas Stephens
06/13/2023, 6:46 PMPolicyHolderAddressChanged
or PolicyBeneficiaryAdded
instead of calls to a generic UpdatePolicy
endpoint. To query for the current policy, services would either have to get all events from the event store, order them, and compute the state in-memory, or query a "projection" showing the current state. We tended to opt for the projection route for performance. With a few exceptions, mostly everything communicated via publishing an event to a queue. We chose event sourcing because we knew we needed audited history for the policies. We built & modeled that entire system using protobufs for the event definitions.
Why I ultimately consider it a failure (this startup recently shut down at the beginning of the year), is that it simply took way, way, way too much time to engineer the system like this. And from a compliance perspective, we would have been okay simply creating triggers on our database tables that inserted versions of rows into some "history" table. We had real problems when we needed to add new events to the domain or update the schema of existing events - which are inevitable changes in any system. This meant that every single projection needed to be replayed & rebuilt, and this was especially expensive for the projections we built for our analytics team, as they needed the most generic view of the data. As our data grew, this only become more difficult.
I do remember we ran several event-storming sessions to model the business before we started eng work, so if you're thinking about it, it might be useful to do this exerciseMoshe Eshel
06/13/2023, 6:55 PMLucas Stephens
06/13/2023, 7:00 PMMoshe Eshel
06/13/2023, 7:47 PMDaniel Chaffelson
06/14/2023, 8:17 AMDaniel Chaffelson
06/14/2023, 8:42 AMMoshe Eshel
06/14/2023, 9:42 AMDaniel Chaffelson
06/14/2023, 9:53 AMMoshe Eshel
06/14/2023, 6:13 PMGerard Klijs
06/30/2023, 5:27 AMGerard Klijs
06/30/2023, 5:34 AM