Are you using in-memory projections with CQRS/ES commanded?

Hi,

I am working on an application using CQRS and Event Sourcing with the help of the commanded library.

I am interesting in using in-memory projections for some of my read models instead of persisting them to a database (for example).

Does anyone (@slashdotdash? ) have experience with this and feedback to share?

Thank you

The next version of EventStore has support for transient subscriptions (#215). These subscriptions won’t persist the last seen event so if you restart the subscription it will replay all the events from wherever you configure it to start from (origin, current, or specific event number). You could use this feature to have projections replay their events each time they start.

The downside of this approach is that it will take longer to build the projection as more events are stored. For this reason I always prefer to use persistent read model projections and not rebuild them from scratch. A hyrbid approach might be to snapshot the projection after a certain number of events and then rebuild the projection starting with the latest snaphot and creating a subscription from the next event after the snapshot’s version.

1 Like

I have now published EventStore v1.2.0 to Hex so you can start using transient subscriptions.

5 Likes