DEV Community

Kévin F
Kévin F

Posted on • Updated on

🕓 Time machine power!

When dealing with Event Sourcing, you immediately realize that you potentially have a time machine under hand.

This is huge.

Want to get a copy of your prod environment at a given date? Transfer the prod event store to a staging environment, remove events older than your date, and reset the projections. You'll be able to put yourself into the shoes of your client via a nice time travel, and that is especially valuable for debugging purposes.

Would love to retrieve the state the prod was in before an evil insoluble morning crash? Little sacrifice: remove the event that is causing the problem into the prod event store and reset the projections to get your prod ok again, then get into your local environment, fix the buggy code part, publish the fix on prod, and you're done.

In short (as is the article), the epitome of Event Sourcing seems to be found in a deep control of the fourth dimension: time!

Oldest comments (0)