HappYness-Project / Happy-EventSourcing

Event sourcing
10 stars 1 forks source link

EventStore Implementation #2

Closed hyunbin7303 closed 1 year ago

hyunbin7303 commented 2 years ago

Event Sourcing is the persistence mechanism where each state transition for a given entity is represented as a domain event gets persisted to an event database. When the entity state mutates, a new event is produced and saved. When we need to restore the entity state, we read all the events for that entity and apply each event to change the state, reaching the correct final state of the entity when all available events are read and applied.

Todo

hyunbin7303 commented 2 years ago

Read this : https://www.eventstore.com/blog/what-is-event-sourcing

hyunbin7303 commented 2 years ago

Read this : https://chaitanyasuvarna.wordpress.com/2021/05/30/event-sourcing-pattern-in-net-core/

hyunbin7303 commented 2 years ago

Use this one for the project for now https://github.com/bolicd/eventstore/blob/1fd6faa1b4751d83e065c3df32c7a4a8b0e5ef7b/Infrastructure/Repositories/IEventStore.cs#L7

hyunbin7303 commented 2 years ago

It stores all events that occurred in your application which led to the current state.

There is an interface which routes commands to the write model. https://medium.com/digitalfrontiers/the-good-the-bad-and-the-ugly-how-to-choose-an-event-store-f1f2a3b70b2d