cqrs

Reporting in the CQRS/ES world

巧了我就是萌 提交于 2019-12-07 18:32:27
问题 I think I understand the idea of the read model in the context of ES + CQRS (please correct me if not). However, I still have a few doubts about using it in the context of ‘serious’ reporting. Let us say I use a relational db plus some ORM to crud my read models. One basic ‘summary stats read model’ could look like this: class SummaryStats1 { public Guid TypeId { get; set; } public string TypeName { get; set; } public Guid SubTypeId { get; set; } public string SubTypeName { get; set; } public

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

点点圈 提交于 2019-12-07 17:56:54
问题 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

Command Pattern in GOF vs CQRS meanings

a 夏天 提交于 2019-12-07 09:28:27
问题 When Looking at the command pattern a found a slight difference. May be some is able to more clearify this. When looking at Gang Of Four it says that each command has a Execute Method see for example: http://www.blackwasp.co.uk/Command.aspx like: myCommand.Execute(myValue); Now when i look at the commands how there are used in CQRS (Greg Young) i see that this commands don't have an execute method. They are only some kind of "Command Instruction" instance. Similar things are said in the CQRS

Handling errors/exceptions in a mediator pipeline using CQRS?

丶灬走出姿态 提交于 2019-12-07 02:26:54
问题 I'm trying to follow this post by Jimmy Bogard to implement a mediator pipeline so I can use pre/post request handlers to do some work. From the comments on that article I come to this github gist. I don't quite understand how to hook all of this up yet, so here is my first go. FYI - I'm using Autofac for DI and Web Api 2. Following CQRS, here is a query. public class GetAccountRequest : IAsyncRequest<GetAccountResponse> { public int Id { get; set; } } //try using fluent validation public

Multiple Aggregates Root INSTANCES per transaction

一世执手 提交于 2019-12-07 00:51:51
问题 In DDD the Aggregate should represent the transactional boundary. A transaction that requires the involvement of more than one aggregate is often a sign that either the model should be refined, or the transactional requirements should be reviewed, or both. Does it mean the transaction boundary is per aggregate root INSTANCE or per aggregate? Say I have an aggregate root called "Node", within each "Node" I have a collection of "Fields (Value objects)". Each "Field" is of a Type, and can be of

CommandHandler decorators dependency

时光毁灭记忆、已成空白 提交于 2019-12-06 15:42:10
I have an issue where I would like my handler to use data generated from the handlers: UpdateUserProfileImageCommandHandlerAuthorizeDecorator UpdateUserProfileImageCommandHandlerUploadDecorator UpdateUserProfileImageCommandHandler My problem is both architectural and performance. UpdateUserCommandHandlerAuthorizeDecorator makes a call to the repository (entityframework) to authorize the user. I have other decorators similar to this that should use and modify entities and send it up the chain. UpdateUserCommandHandler should just save the user to the database. I currently have to make another

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

Is there any specific way for Axon migration from 2.4.3 version to 3.1.1

拥有回忆 提交于 2019-12-06 13:58:12
I am new to axon and doing migration from Axon 2.4.3 to 3.1.1 but I am not able to find any migration guide which is available for other version? Can you please share your experience on how to do the same. I am facing a lot problem, some classes have been removed, some packages have been changed. For some classes I am even not able to find replacements, so please help me with some suggestion. If there is a guide for same please provide me with link of that. Thanks in Advance Acctually I am not able to find replacement for these which were there in axon 2.4.3 ClusteringEventBus-

How to use J Oliver's EventStore library?

眉间皱痕 提交于 2019-12-06 12:37:04
I've been looking into Event Sourcing for a new project with J Oliver's EventStore and mongo as the persistence layer but have come across a few questions: Previous to trying event sourcing my domain persisted to a db and I've been using Udi's domain events pattern which has worked really well for me with NHibernate managing the unit of work. However I've ended up with one unit of work that can affect more than one aggregate eg. I "checkout" my shopping basket aggregate which raises an event for which a handler responds by creating an invoice aggregate which in turn raises an event (this is an

CQRS code duplication in commands

醉酒当歌 提交于 2019-12-06 12:30:31
I have a question about code duplication in the command side of the CQRS principle. Been following the articles from: https://www.cuttingedge.it/blogs/steven/pivot/entry.php?id=91 https://www.cuttingedge.it/blogs/steven/pivot/entry.php?id=92 It seems to me that this approach of separating each command in it's own class is going to give some code duplication when retrieving the entities from the data store. A bit contrived perhaps but let's say for example I have a command where I want to reset a users password given his email-address and a command where I want to update the user's last login