event-sourcing

Importing data and Event Sourcing

时光毁灭记忆、已成空白 提交于 2019-12-06 14:05:25
问题 I am currently working on a monolithic system which I would like to bring into the modern day and incorporate DDD and CQRS. I have been presented with a request to re-write the importing mechanism for the solution and feel this could present a good opportunity to start this re-architecting process. Currently the process is: User uploads CSV System parses CSV and shows each row on screen. Validation takes place for each row and errors/warnings associated with each row User can modify each line

Transaction handling in event sourcing

陌路散爱 提交于 2019-12-06 13:34:13
I'm trying to wrap my head around transactions in event sourcing. I have one aggregate (transaction scope) in my event store. A command gets processed and is producing 10 events. Now, can this be handled as 1 transaction or is this 10 transactions? With transaction I mean changes to the state that is only valid together as a whole. Have I designed my events wrong if they are split up into many events like this even though I want them to be handled as a whole? I tend to think that it is the command that is what is defining the transaction, the intent, and that all events produced by that

Occasionally connected CQRS systems - Client and Server Commands - Task based screens

最后都变了- 提交于 2019-12-06 06:19:06
Premise: It is recommended that in CQRS+DDD+ES style applications use task based screens, these screens guide the user and capture intent. These task screens can also be referred to as Inductive User Interface . Some examples of UI design guidelines that can help you create mondern, user-friendly apps: Microsoft Inductive User Interface Guidelines and, Index of UX guidelines The way I understand it, the tasks , generally speaking, should line up with Commands or Functions waiting on the Server. For example, if the User makes a change to the Customer's [first name], generally speaking this

How are consistency violations handled in event sourcing?

喜夏-厌秋 提交于 2019-12-06 06:11:05
问题 First of all, let me state that I am new to Command Query Responsibility Segregation and Event Sourcing (Message-Drive Architecture), but I'm already seeing some significant design benefits. However, there are still a few issues on which I'm unclear. Say I have a Customer class (an aggregate root) that contains a property called postalAddress (an instance of the Address class, which is a value object). I also have an Order class (another aggregate root) that contains (among OrderItem objects

Generating events from SQL server

核能气质少年 提交于 2019-12-06 04:36:27
问题 I am looking for a best practice or example of how I might be able to generate events for all update events on a given SQL Server 2008 R2 db. To be more descriptive, I am working on a POC where I would essentially publish update events to a queue (RabbitMq in my case) that could then be consumed by various consumers. This would be the first part of implementing a CQRS query-only data model via event sourcing. By placing on the que anybody could then subscribe to these events for replication

Logstash -> Elasticsearch - update denormalized data

筅森魡賤 提交于 2019-12-06 03:31:24
问题 Use case explanation We have a relational database with data about our day-to-day operations. The goal is to allow users to search the important data with a full-text search engine. The data is normalized and thus not in the best form to make full-text queries, so the idea was to denormalize a subset of the data and copy it in real-time to Elasticsearch, which allows us to create a fast and accurate search application. We already have a system in place that enables Event Sourcing of our

Should an API Gateway Communicate via a Queue or directly to other μServices?

限于喜欢 提交于 2019-12-05 18:40:57
I was wondering which of my two methods is more appropriate, or is there event another one? (1) Direct Direct communication between GATEWAY and μSERVICE A UI sends HTTP request to GATEWAY GATEWAY sends HTTP request to μSERVICE A μSERVICE A returns either SUCCESS or ERROR Event is stored in EVENT STORE and published to QUEUE PROJECTION DATABASE is updated Other μSERVICES might consume event (2) Events Event-based communication via a message queue UI sends HTTP request to GATEWAY GATEWAY published event to QUEUE μSERVICE A consumes event Event is stored in EVENT STORE and published to QUEUE

Event Sourcing and SQL Server multiple relational tables

别等时光非礼了梦想. 提交于 2019-12-05 05:28:08
We use event sourcing with SQL Server 2016. We have total Customer Product Application, each is labelled by CustomerId and gets a single Guide line item in the event store. This is the primary identifier for write event store guids. The Product Applications comes with many different relational things, (which do not have guids but natural keys) each customer has Multiple Addresses, Accounts, Multiple purchase orders. The write event store will be mapped to a relational database tables any way we choose. In databases, we try to relate join by surrogate keys, instead of natural keys. Can the

JOliver EventStore - How to access all stored events?

故事扮演 提交于 2019-12-04 12:42:49
How can I access all stored events in the EventStore to rebuild my read models? A method called GetFrom is mentioned at question J Oliver EventStore V2.0 questions , but I cannot find this method on the interface "IStoreEvents" which is returned from Wireup. Jonathan Oliver That method is a part of the IPersistStreams interface and not the IStoreEvents interface. The API needs to be refined slightly to accommodate that. I have just added a method to IStoreEvents called GetFrom(DateTime started) that returns IEnumerable<Commit> : https://github.com/joliver/EventStore/commit

In ES + CQRS + DDD, can a event not update any real domain state at all?

末鹿安然 提交于 2019-12-04 12:26:02
问题 Would it be ok to have events in the event stream that does not effect any aggregate in the domain state? Take for instance an event such as AllCompletedTodosPurged that does nothing more than change a read model with active todos by removing all completed todos. 回答1: No, it wouldn't be ok. A Domain event is generated when the aggregate state changes. If nothing changed, there is no domain event. You can use events outside the domain as well, but they wouldn't be part of the domain and