nurkiewicz / nurkiewicz.com

https://nurkiewicz.com
10 stars 6 forks source link

#28: Event sourcing | Around IT In 256 Seconds By Tomasz Nurkiewicz #10

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

28: Event sourcing | Around IT In 256 Seconds By Tomasz Nurkiewicz

Event sourcing is an alternative technique of storing business data. Rather than updating a single database record, every change is captured in an immutable, append-only log. We never overwrite existing data. Instead, we create and store an event that represents what exactly has changed. From the business perspective. In order to recreate the current state of an entity we must go through all the events and reconstruct it from history. Event sourcing brings better auditing and debugging. Also, storing changes can be faster because it requires inserting a new record rather than updating an existing one.

https://256.nurkiewicz.com/28

zdzichu commented 3 years ago

Hi, You provide an example of "replaying customer event stream on development laptop". This is horrible! Customer data should never leave controlled production environment. Dev's laptop is not a place for PIIs and other GPDR-regulated pieces of information.

nurkiewicz commented 3 years ago

Very good point! As a matter of fact, event sourcing is troublesome regarding the right to be forgotten as well. By definition, event-sourced systems don't forget. Back to the point, any form of copying data from production to developer's machine (or from production to staging or preprod) is highly risky. If there is a chance of PII leaking, some form of anonymization should be applied first. This is doable and doesn't defeat the purpose of event sourcing.

Thanks for your comment!