Git Product home page Git Product logo

Comments (8)

frankdejonge avatar frankdejonge commented on June 6, 2024 1

Hi @Toflar :)

This functionality is currently not included in EventSauce. The main reason for this is that an aggregate root is responsible for making decisions and should do that based on the latest info. Going back into history is something that would be possible by making using read-models that directly read from the message repository.

Perhaps you can explain what specific case you're trying to support. My guess if that you're using the aggregate root for reads, which is generally a bit of an anti-pattern. But curious to hear what your specific case is all about.

from eventsauce.

frankdejonge avatar frankdejonge commented on June 6, 2024 1

The idea would be that the projection would resolve the messages from the repository when asking for the state at a given point in time, so no need to pre-compile it for every step. Basically it would be as expensive as loading two aggregate roots, which should be quite alright.

from eventsauce.

Toflar avatar Toflar commented on June 6, 2024 1

Defintely, thanks!

from eventsauce.

Toflar avatar Toflar commented on June 6, 2024

I see your point. It really is a read operation so it should probably indeed not be part of the aggregate.
Basically I'm working on some POC for a general content repository to store whatever content. If you check my OSS contributions on GitHub you can kinda guess where I'm coming from 😉 We're talking CMS stuff here.
And I think a typical use case would be a user that wants to compare the current version of a content node with the previous one or the one of 30 days ago etc.
So having a projection for that sounds a bit inflexible because projections require to know in advance what the user would want to compare.

from eventsauce.

Toflar avatar Toflar commented on June 6, 2024

Yep, that's what I did now and it works perfectly 😉 Thanks!
Since the EventSauce docs are so well written, what do you think of an FAQ section for questions like this? I could of course contribute 😊

from eventsauce.

frankdejonge avatar frankdejonge commented on June 6, 2024

Awesome, yes. We can can create a section for case studies, or common problems with solution. Contribution would be much appreciated.

from eventsauce.

Toflar avatar Toflar commented on June 6, 2024

#180 :)

from eventsauce.

frankdejonge avatar frankdejonge commented on June 6, 2024

I'll consider this fixed with the addition of the documentation :)

from eventsauce.

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.