cqrs

Replay events for adjustments

房东的猫 提交于 2019-12-22 10:48:44
问题 Hypothetically I'm working on a system that uses "Event Sourcing" (storing the business events) that has purchase and selling of materials; at some point a report, with prices and costs information is generated. Imagine that one of my clients call me and says, "The costs are wrong, for me, the rules from profit are this way". I could add more handlers or change the rules to adjust to this particular case, and replay the events. But my question is, this is the correct approach (or at least the

DDD, Event store, UI

↘锁芯ラ 提交于 2019-12-22 07:51:44
问题 I have a project which is designed or at least should be according to the well known DDD principles. Back - DDD + CQRS + Event Store UI - ngrx/store I have a lot of questions to ask about it but for now I will stick to these two: How should the UI store be updated after a single Command/Action is executed ? a) subscribe to response.ok b) listen to domain events c) trigger a generic event holding the created/updated/removed object ? Is it a good idea to transfer the whole aggregate root dto

DDD, Event store, UI

ⅰ亾dé卋堺 提交于 2019-12-22 07:51:12
问题 I have a project which is designed or at least should be according to the well known DDD principles. Back - DDD + CQRS + Event Store UI - ngrx/store I have a lot of questions to ask about it but for now I will stick to these two: How should the UI store be updated after a single Command/Action is executed ? a) subscribe to response.ok b) listen to domain events c) trigger a generic event holding the created/updated/removed object ? Is it a good idea to transfer the whole aggregate root dto

multiple types for SetHandlerInterface() with membus and ioc container

我的梦境 提交于 2019-12-22 05:38:28
问题 Going over demo CQRS code here the command and event handlers are wired up separately as below: public interface CommandHandler<in T> { void Handle(T command); } public interface EventHandler<in T> { void Handle(T @event); } bus = BusSetup.StartWith<Conservative>() .Apply<FlexibleSubscribeAdapter>(a => { a.ByInterface(typeof(IHandleEvent<>)); a.ByInterface(typeof(IHandleCommand<>)); }) .Construct(); I am using an IoC container hooked in with membus and it works a dream by implementing the

CQRS: business logic on the query side

馋奶兔 提交于 2019-12-21 23:18:18
问题 Following the concept of CQRS (Command Query Responsibility Segregation), I am directly referring the DAL in my MVC application and doing all reads via the ViewModels. However a colleague of mine is asking me what will you do when any business logic has to be applied when doing a read. For e.g. if you need to compute a percentage value in scenario like below: //Employee domain object class Employee { string EmpName; Single Wages; } //Constant declared in some utility class. This could be

DDD/CQRS confusion regarding ReadModels and the Domain

你。 提交于 2019-12-21 20:45:14
问题 So after much reading I've now come to the realization that complex reporting functions do not belong in your typical Repository and that there needs to be some kind of dedicated "Finder" which returns read only objects to be used in reporting. What I'm unclear on is where the "Finder" classes, as well as their associated ReadModel classes are supposed to go inside my project? Are the finders like repositories in that you have an interface for the finder inside the infrastructure assembly

RESTful API Design and CQRS

瘦欲@ 提交于 2019-12-21 20:38:40
问题 I was thinking of how to make a RESTFul API more intention revealing. A common patter I see around various blogs on this is that conventional REST API results in Ban a Player -> POST /players. But I were to change to a more intention revealing interface , I could use Ban a Player -> POST /players/{ playerid }/banPlayer The second one I feel is more intention revealing. The common objection I get from the team is that the second one does not comply with start REST style. Also currently I

Choosing a NoSQL database for storing events in a CQRS designed application

梦想与她 提交于 2019-12-21 20:37:24
问题 I am looking for a good, up to date and "decision helping" explanation on how to choose a NoSQL database engine for storing all the events in a CQRS designed application. I am currently a newcomer to all things around NoSQL (but learning): please be clear and do not hesitate to explain your point of view in an (almost too much) precise manner. This post may deserve other newcomers like me. This database will: Be able to insert 2 to 10 rows per updates asked by the front view (in my case,

What is causing EventStore to throw ConcurrencyException so easily?

匆匆过客 提交于 2019-12-21 19:49:09
问题 Using JOliver EventStore 3.0, and just getting started with simple samples. I have a simple pub/sub CQRS implementation using NServiceBus. A client sends commands on the bus, a domain server recieves and processes the commands and stores events to the eventstore, which are then published on the bus by the eventstore's dispatcher. a read-model server then subscribes to those events to update the read-model. Nothing fancy, pretty much by-the-book. It is working, but just in simple tests I am

What is causing EventStore to throw ConcurrencyException so easily?

泪湿孤枕 提交于 2019-12-21 19:46:01
问题 Using JOliver EventStore 3.0, and just getting started with simple samples. I have a simple pub/sub CQRS implementation using NServiceBus. A client sends commands on the bus, a domain server recieves and processes the commands and stores events to the eventstore, which are then published on the bus by the eventstore's dispatcher. a read-model server then subscribes to those events to update the read-model. Nothing fancy, pretty much by-the-book. It is working, but just in simple tests I am