GithubHelp home page GithubHelp logo

Comments (9)

gautema avatar gautema commented on July 27, 2024

The constructor with this problem was marked obsolete a long time ago. Are there any other problems you have?

from cqrslite.

Narvalex avatar Narvalex commented on July 27, 2024

That's correct. Thank you. I was just poking around the sample, and the InMemoryEventStore does use an IEventPublisher, which is the InProcessBus I think. Maybe to encourage people to take the recommended approach will be to create some sort of CatchUpSubscription class. If you are agree I could try write one of such

from cqrslite.

gautema avatar gautema commented on July 27, 2024

There is nothing wrong with using the InProcessBus for this. The only difference from publishing both from the repository is that when publishing from the eventstore, it can happen async and after the events have been saved instead of at the same time

from cqrslite.

Narvalex avatar Narvalex commented on July 27, 2024

It hurts performance (to ensure commit in the event store and in the bus"), and couples the read model with the write one. And it will be a lot harder to build a new read model and add it to production without loosing events when the trasition occurs. A lot of accidental complexity happens when you need to deploy a new read model that needs to process all events from the begining. To summarize: It makes it harder to sell CQRS to the organization, as oposed to market it as "build a new read model for the new reporting requirement in minutes and put it production right away". My english is bad, Im sorry about that. Im just trying to make a point.

from cqrslite.

gautema avatar gautema commented on July 27, 2024

If you could give an example of a solution please do. I see that you not want to send all events on an async bus, but I fail to see how this couples the read and write model or how you can build a new readmodel without processing the events from the beginning.

from cqrslite.

Narvalex avatar Narvalex commented on July 27, 2024

I think that I did not explain myself well. I will try again: With the current code, if you want to have a new read model you write one and register it into the bus, but you will only receive the new events from now on. There is not a simple way to make it process from the begining, and when catched up make it process live.

from cqrslite.

gautema avatar gautema commented on July 27, 2024

Ok, I understand, and agree that this is not easy. I can also understand that the InProcessBus might encourage using an ESB and 2pc, but I think the publish operation with automatic registration of handlers is useful even if it has some problems. I thought about renaming the InProcessBus to something else a while ago since I think the naming is what causes most confusion, but decided against it since I didn't think a renaming was worth a breaking change, but I may have been wrong.

from cqrslite.

gautema avatar gautema commented on July 27, 2024

And by the way, if you have any ideas on how to make things more clear or make it easier to add new read models I'm all ears. But I also don't want the framework to be to hard to start with. I find it better that people grow out of using it after a while than not get started at all.

from cqrslite.

Narvalex avatar Narvalex commented on July 27, 2024

I agree with you. Thanks for your time!

from cqrslite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.