eventflow / EventFlow

Async/await first CQRS+ES and DDD framework for .NET
https://geteventflow.net
Other
2.39k stars 445 forks source link

Redis event, read and snapshot persistence #956

Closed joshua211 closed 1 year ago

joshua211 commented 2 years ago

I've played around with redis as a primary persistent database and found redis streams to be good match for event sourcing applications, so I've implemented RedisEventPersistence for EventFlow. While at it, I've also implemented a RedisReadModelStore and RedisSnapshotPersistence. The event persistence requires redis >= v5.0 to use streams, the readmodel and snapshot persistence require the redis search and redis json module, all of which are included in Redis Stack. Querying readmodels is done by using Redis OM, which abstracts the redis search module into LINQ collections.

All integration tests are passing, but require a running docker daemon to setup the TestContainer instance.

CLAassistant commented 2 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: joshua211
:x: Joshua Hillmann


Joshua Hillmann seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

joshua211 commented 2 years ago
  • The RedisHashBuilder is a pretty complicated class with a lot of different cases and possibilities to do something wrong if anyone were to change it. I would really love to see some unit tests of the class specifically

Added more tests to HashBuilderTests.cs

  • I'm moving the documentation to this repository as to have everything combined. Are you up for writing a page or two on the Redis additions? The setup is still raw and has much that is missing, but getting this done will really help making it easier for everyone to use

Sure, let me know if i should make a pull request to the documentation repo or wait until it is moved

Edit Nvm, just saw the docs in this repo. Adding some pages soon.

joshua211 commented 2 years ago

Added some documentation to the redis integration part, let me know if anything is missing.

rasmus commented 2 years ago

Just a minor test failing https://github.com/eventflow/EventFlow/actions/runs/3219558430/jobs/5660869142

github-actions[bot] commented 1 year ago

Hello there!

We hope this message finds you well. We wanted to let you know that we have noticed that there has been no activity on this pull request for the past 90 days, which makes it a stale pull request.

As a result, we will be closing this pull request within the next seven days. If you still think this pull request is necessary or relevant, please feel free to update it or leave a comment within the next seven days.

Thank you for your contributions and understanding.

Best regards, EventFlow

github-actions[bot] commented 1 year ago

Hello there! I'm a bot and I wanted to let you know that your pull request has been closed due to inactivity after being marked as stale for seven days. If you believe this was done in error, or if you still plan to work on this pull request, please don't hesitate to reopen it and let us know. We're always happy to review and merge high-quality contributions. Thank you for your interest in our project! Best regards, EventFlow