2 ms·
The whole point of event sourcing is the ability to manage state effectively. When you move state out of the event sourcing model you are losing the state manag
by jshen 9y ago
The whole point of event sourcing is the ability to manage state effectively. When you move state out of the event sourcing model you are losing the state management benefits of event sourcing for that data. Maybe that’s a reasonable trade-off for GDPR, but there is a trae-off.
- ithkuil 9y agoThere are ways to put some state outside the event stream that play nicely with the model. For example you could store the body in a content addressed store (a key value store whose keys are hashes of the value). This preserves the ideal model of immutable events as you cannot accidentally change the content of the event since that would violate the property of the CAS. But nothing prevents you from deleting an entry in the CAS. However you still have to find all the records you need to delete! The trick with forgetting the encryption key let makes this step a O(1) operation. On the other hand it forces you to decide upfront the granularity of ownership, i.e. if you treat payload deletion as a batch process you can deal with mistakes, change your mind about which data should or should not be deleted. While with the encryption technique, changing your mind would require you to perform a full history replay and reencrypt data in a new stream (and throw away the old one) with the new granularity model.