Questions tagged [event-sourcing]

Event Sourcing is a design pattern that captures all changes to an application's state as a sequence of events.

A design pattern publicized by Martin Fowler in which changes to application state are represented as events which contain snapshots of data that describe the change. See Event Sourcing at MartinFowler.com.

1220 questions
23
votes
2 answers

Snapshot taking and restore strategies

I've been reading about CQRS+EventSoucing patterns (which I wish to apply in a near future) and one point common to all decks and presentations I found is to take snapshots of your model state in order to restore it, but none of these share…
Mikhas
  • 851
  • 1
  • 12
  • 31
22
votes
3 answers

Event Sourcing and optimistic concurrency control

When you want code works under race conditions, commonly developers uses Optimistic concurrency control (OCC). From Wikipedia: ...before committing, each transaction verifies that no other transaction has modified the data it has read. If the…
22
votes
4 answers

CQRS Event Sourcing check username is unique or not from EventStore while sending command

EventSourcing works perfectly when we have particular unique EntityID but when I am trying to get information from eventStore other than particular EntityId i am having tough time. I am using CQRS with EventSourcing. As part of event-sourcing we…
Roshan
  • 873
  • 12
  • 33
21
votes
1 answer

Read side implementation approaches using CQRS

I've moved to the project which is actively using CQRS + event sourcing. From the first glance it's implemented in accordance with all those books and blogs, but finally I realized what exactly is peevish in the implementation. Here is CQRS…
Max
  • 601
  • 8
  • 21
19
votes
2 answers

Event Sourcing Commands vs Events

I understand the difference between commands and events but in a lot of cases you end up with redundancy and mapping between 2 classes that are essentially the same (ThingNameUpdateCommand, ThingNameUpdatedEvent). For these simple cases can you / do…
user842807
  • 191
  • 1
  • 4
19
votes
1 answer

CQRS event store aggregate vs projection

In a CQRS event store, does an "aggregate" contain a summarized view of the events or simply a reference to the boundary of those events? (group id) A projection is a view or representation of events so in the case of an aggregate representing a…
webish
  • 701
  • 2
  • 9
  • 17
19
votes
3 answers

Event Sourcing - How to delete data in an eventstore?

How to work around the issue of deleting data in an eventstore? I need to permanently and completely delete some data in order to comply to privacy laws. I have found these alternatives: Encrypt the data that you need deleted, and store the…
Jan-Terje Sørensen
  • 14,468
  • 8
  • 37
  • 37
18
votes
2 answers

Synchronize Data across multiple occasionally-connected-clients using EventSourcing (NodeJS, MongoDB, JSON)

I'm facing a problem implementing data-synchronization between a server and multiple clients. I read about Event Sourcing and I would like to use it to accomplish the syncing-part. I know that this is not a technical question, more of a conceptional…
18
votes
3 answers

Handling out of order events in CQRS read side

I've read this nice post from Jonathan Oliver about handling out of order events. http://blog.jonathanoliver.com/cqrs-out-of-sequence-messages-and-read-models/ The solution that we use is to dequeue a message and to place it in a “holding table”…
Dasith Wijes
  • 1,328
  • 12
  • 22
18
votes
2 answers

How to support Command in REST while doing REST, CQRS and EventSourcing together?

Consider the following coarse grained REST apis for a Contact resource POST /api/contacts GET /api/contacts GET /api/contacts/:id PUT …
PainPoints
  • 461
  • 8
  • 20
18
votes
4 answers

How to model bank transfer in CQRS

I'm reading Accounting Pattern and quite curious about implementing it in CQRS. I think AccountingTransaction is an aggregate root as it protects the invariant: No money leaks, it should be transfer from one account to another. public class…
Yugang Zhou
  • 7,123
  • 6
  • 32
  • 60
17
votes
4 answers

Event sourcing: handle event schema changing

As a software project built on an event sourcing architecture evolves, the event schema (or event types) are among the things most likely to change over time. One of the benefits event sourcing architecture offers is that it's able to "replay all…
Jordi
  • 20,868
  • 39
  • 149
  • 333
17
votes
2 answers

Event Sourcing: proper way of rolling back aggregate state

I'm looking for an advice related to the proper way of implementing a rollback feature in a CQRS/event-sourcing application. This application allows to a group of editors to edit and update some editorial content, an editorial news for instance. We…
Enrico Massone
  • 6,464
  • 1
  • 28
  • 56
17
votes
3 answers

CQRS Data store approach Nosql Or Sql Server

I am going through the research stage for a new project and I am currently having a debate with a work colleague about the architecture of the project. We have agreed that we will create a distributed messaging system using CQRS and Event sourcing…
user3177251
  • 201
  • 2
  • 8
17
votes
3 answers

User Auth in EventSourcing applications

I'm looking into crafting an app with DDD+CQRS+EventSourcing, and I have some trouble figuring out how to do user auth. Users are intrinsically part of my domain, as they are responsible for clients. I'm using ASP.NET MVC 4, and I was looking to…
tuxbear
  • 551
  • 4
  • 13
1
2
3
81 82