abp icon indicating copy to clipboard operation
abp copied to clipboard

CQRS infrastructure

Open hikalkan opened this issue 8 years ago • 38 comments

Investigate the EventFlow framework:

Source: https://github.com/eventflow/EventFlow Document: http://docs.geteventflow.net/

hikalkan avatar Dec 25 '16 17:12 hikalkan

What do you think about this? https://www.youtube.com/watch?v=_lwCVE_XgqI https://github.com/JasonGT/NorthwindTraders

and using CQRS + MediatR?

tomlewandowski avatar Oct 28 '18 21:10 tomlewandowski

Thanks @tomlewandowski for sharing. Will take a look.

hikalkan avatar Oct 29 '18 07:10 hikalkan

HI, Is there any progress?

kegumx avatar Jul 19 '19 13:07 kegumx

Not worked on this yet.

hikalkan avatar Jul 19 '19 14:07 hikalkan

Command / Query segregation via MediatR is the only thing I've really been waiting on for ABP.

Some refactoring of the event bus and background job service layers could also be done to leverage the MediatR notification pipeline for event dispatching.

GFoley83 avatar Aug 27 '19 02:08 GFoley83

@hikalkan I found a very nice repository that is a very good reference to DDD and CQRS. https://github.com/kgrzybek/modular-monolith-with-ddd What do you think about this two building blocks?: https://github.com/kgrzybek/modular-monolith-with-ddd/blob/master/src/BuildingBlocks/Domain/TypedIdValueBase.cs

https://github.com/kgrzybek/modular-monolith-with-ddd/blob/master/src/BuildingBlocks/Domain/IBusinessRule.cs

This is another great resource: https://herbertograca.com/2017/11/16/explicit-architecture-01-ddd-hexagonal-onion-clean-cqrs-how-i-put-it-all-together/

tomlewandowski avatar Aug 27 '19 17:08 tomlewandowski

set priority high and please move to milestone 1.0

pranavpatil19 avatar Oct 16 '19 16:10 pranavpatil19

Can't move it to 1.0, it is very close to release 1.0 and we can't add new features to 1.0.

hikalkan avatar Oct 17 '19 16:10 hikalkan

is this module move to 1.1

pranavpatil19 avatar Oct 18 '19 13:10 pranavpatil19

We will see, can't promise.

hikalkan avatar Oct 19 '19 17:10 hikalkan

. i request you because i want to integrate CQRS With Rabbitmq . if you take this high priority after 1.0 release its really helpful

pranavpatil19 avatar Oct 19 '19 17:10 pranavpatil19

@tomlewandowski that video you linked to was absolute gold and I think perfectly showcased how well MediatR would slot into the current ABP solution design. It's a perfect fit.

GFoley83 avatar Oct 20 '19 01:10 GFoley83

Any progress on CQRS + MediatR ?

ramax495 avatar Nov 17 '19 18:11 ramax495

i am also waiting for this module.... 2year old request.

pranavpatil19 avatar Nov 18 '19 06:11 pranavpatil19

i am also waiting for this module.... 2year old request.

Yes, but v1.0 has been released just 1 month ago :) We don't want to work on new features while leaving current feature incomplete & undocumented. Built-in CQRS infrastructure on the road map, but can't promise on any date.

hikalkan avatar Nov 22 '19 19:11 hikalkan

Is there room for this feature in 2.2?

thiag0coelho avatar Feb 19 '20 12:02 thiag0coelho

Hey guys. Any progress/news? Considering option to migrate on your framework and but we would really love to keep working with MediatR.

maskalek avatar Sep 22 '20 16:09 maskalek

Any update on MediatR?

maulik-modi avatar Sep 25 '20 11:09 maulik-modi

+1

kegumx avatar Oct 13 '20 08:10 kegumx

I too would appreciate the implementation of CQRS + MediatR

jader1313 avatar Oct 19 '20 11:10 jader1313

Any progress on CQRS + MediatR ?

feynmanloo avatar Dec 04 '20 15:12 feynmanloo

Hi Guys, Just looking at an evaluating abp.io I've used zero in the past and really liked it

Can I check where this feature thread is in planning?

For my clarification, as CQRS and Event Sourcing are related but not the same... but we are discussing both here (and clean architecture) so I'm a bit confused as to what this feature would be?

I'd love to get to the point where we have an event sourcing model, or at least a stronger event model which can then feed into features such as automation and workflows, as well as opening up options for CQRS for developers.

I believe this is a missing enabler for the abp core platform and it's something that I've done manually at the moment using MediatR and a lot of bespoke code in abp.zero... so hoping that can be part of the new platform :)

Imagine being able to use something like elsa workflow / camunda (or your own tool) to be able to allow users to create their own actions and triggers and create automation such as :

  • When [event] then [action]
  • When someone creates a user then add them to the onboarding workflow
  • When someone creates a tenant then send an email to the marketing team
  • When someone marks an invoice paid then send a message in teams to accounting. or To be able to build out a BPMN workflow using these events and activities.

Just my thoughts :)

tunechr avatar Feb 09 '21 02:02 tunechr

CQRS + MediatR.. any plan to implement this soon? Is there a roadmap so see when its planned ? I am also evaluating abp currently.. Would be a great step ahead if you plan this

barnybadzoo avatar Mar 30 '21 08:03 barnybadzoo

@barnybadzoo, @tomlewandowski and @hikalkan , have you checked https://github.com/ardalis/ApiEndpoints shows MediatR is optional

maulik-modi avatar Mar 30 '21 09:03 maulik-modi

@maulik-modi , yes i did check the Link..but ApiEndpoints with MediatR reduces complexity compared to the well known MVC pattern. Of course you can have both. But please check this FAQ: https://github.com/dotnet-architecture/eShopOnWeb/wiki/Frequently-Asked-Questions where Microsoft shows for both an example (OrderController and ManageController). From my point of view ApiEndpoint with MediatR is much simpler and groups everything that has to do with a particular API endpoint together.

barnybadzoo avatar Mar 30 '21 11:03 barnybadzoo

@barnybadzoo , there are 3 choices -

  1. Use controller - NO MediatR - ManageController
  2. Use controller + MediatR - OrderController
  3. Use ApiEndpoints - NO controller, NO MediatR - https://github.com/ardalis/ApiEndpoints

I am referring to 3)

maulik-modi avatar Mar 30 '21 12:03 maulik-modi

Any update? What about intermodular communication using the CQRS pattern? Currently, there is no possibility to get some resources from another module in the monolith architecture but there are clear needs sometimes to fetch some data. In the microservices architecture, this is typically normal and there are possibilities to do that, using REST API / Query Bus, etc. But using modules and building modular monolith using ready-to-use components there is no possibility to easily do that without introducing coupling

xNarkon avatar Apr 25 '21 09:04 xNarkon

Simple implementation of abp cqrs, using MediatR Fan.Abp.Cqrs

yangfan-zz avatar Nov 06 '21 03:11 yangfan-zz

I found it fairly simple to use the nuget package FS.Abp.MediatR.Domain and use normal MediatR Logic.

In SomeDomainModule.cs: public override void ConfigureServices(ServiceConfigurationContext context) { context.Services.AddAbpMediatR<SomeDomainModule>(); }

public class CreateSomethingCommand : IRequest<Something> { ..... {

public class CreateSomethingCommandHandler : IRequestHandler<CreateSomethingCommand, Something> { async Task<Something> IRequestHandler<CreateSomethingCommand, Something>.Handle(CreateSomethingCommand request, CancellationToken cancellationToken) { return new Something(); } }

To call inject IMediator mediator and then call mediator.Send(new CreateSomethingCommand([arguments])

It would be nice if there was an officially supported Volo.Abp.MediatR.Domain nuget package

appsupport-gc avatar Jul 26 '22 15:07 appsupport-gc

Any updates on this?

adam-dot-cohen avatar Apr 07 '23 16:04 adam-dot-cohen