EventFlow icon indicating copy to clipboard operation
EventFlow copied to clipboard

Lets bring EventFlow to the next level

Open LUKE-JNS opened this issue 6 years ago • 8 comments

Hi, first of all thanks for a great job with this project! I am looking for a codebase that we can use for a new project in my company. Core domain gonna be implement based on DDD ideas, rest of the code we would like to be CQRS. We were looking for some projects and EventFlow is close to what we expect. So we decided to try it. We start with some PoC project to check if EventFlow is production ready, but we also need to make some progress with missing things which are :

  • [ ] commands not related with aggregates (to have some simple jobs done) #460
  • [ ] state machines #407 (we thought about something like https://github.com/MassTransit/Automatonymous simple and readable)
  • [x] support for .Net Core #467 (dependency injection)
  • [ ] possibility to reapply events to newly created read models #245
  • [x] simple event handlers (some of the domain events we would like to re-publish to RabbitMq as an external events)
  • [ ] mssql schema generator (based on readmodels) #476

Probably there will be also case to create aggregates from existing data. We can create initialising command with all data, however, this does not seem to be a clean solution. Maybe some backdoor solution migrating data to aggregates would be nice so it can be done in different project.

Some of them are already covered. I would like to know what is the progress of these improvements and what is your vision for the development of this project. We are able to do some of the work on the occasion of our project, so I would like to coordinate our efforts.

Luke

Edited by rasmus 2018-06-09: Added check marks and reference to MSSQL schema generation Marked "simple event handlers" as completed by rasmus 2018-06-09: These are already present in the form of subscribers

(@LUKE-JNS if you disagree with the edits, let me know, thought it was easier to keep progress here)

LUKE-JNS avatar Jun 04 '18 08:06 LUKE-JNS

Hi @LUKE-JNS thanks for the feedback and I agree. While we already use EventFlow at eBay for several of our micro services, getting these done will make EventFlow more "complete".

For migrating data I started on it in the event streaming PR #464. Have a look at the ImportEvents and see if it suits your needs.

If your team has the time to commit to individual features, simply ping the issue or create an issue with the feature you are working on.

Regarding vision. Well I haven't formulated a some grand vision as EventFlow started as I wanted both to created an open source project and I wanted to try implement a CQRS+ES framework. But I guess the next logical step for EventFlow is to on-board developers that could support the project and help me out.

One thing I would like to do, is to improve the quality of the documentation site at http://docs.geteventflow.net/ as I do think good quality documentation is important for any project. It's just so darn hard to create.

I don't know if that answers your questions, if not, let me know.

rasmus avatar Jun 04 '18 17:06 rasmus

Thanks @rasmus for your reply. The main question is whether you see the usefulness of the listed functionalities and whether they fits your project vision. If so we can cooperate and make a PR to the main repo, if not, we can fork. I would also like to know if you are doing something or planning to do with the improvements that I have linked and listed.

LUKE-JNS avatar Jun 05 '18 09:06 LUKE-JNS

Hi @LUKE-JNS, the feature list you listed matches very well with what I put in the milestone for 1.0 draft and those that isn't in the milestone should be added. I haven't been very active the last few weeks, but I will startup again as EventFlow will be used for a larger project at work.

As what you listed matched very well with what I would like to see added, I would like the changes to go into the main repo.

I tend to let my own PRs be open for some time (I think the sagas PR was open for almost a year). Most of the time its if I hit some problem, if the code doesn't fit well into the code base or if I'm unsure if it should go in at all. However, if there's a feature the is requested, I do try to have it ready within reasonable time.

I do think that EventFlow already has one of the items on your list though. The its called subscribers in EventFlow and there's already an extension for RabbitMQ.

Regarding my plans. I will try to pick up the pace and get some of the PRs that developers has been asking for done.

Small note. You list .NET Core DI as an item, but as Microsoft recommends use another IoC container in production setups, which one are you going for? EventFlow already has support for Autofac on .NET standard.

rasmus avatar Jun 05 '18 18:06 rasmus

Did a crude PoC of the MSSQL schema creation in #476

rasmus avatar Jun 06 '18 20:06 rasmus

@rasmus what is current status of https://github.com/eventflow/EventFlow/pull/245 ?

This PR will allow us to reapply missing events on read models, but what with a case when some exception occurs in Saga (during communication between two aggregates) and first aggregate is in different state then the second one?

For example: I have an OrderAggregate and PaymentAggregate. OA is request for a payment, OrderSaga is catching that event and sending a command to PA, after some time, when payment is completed, PA is throwing an event PaymentProcessCompleted, OrderSaga is catching that event and some exception is occuring. We're ending with PaymentAggregate with finished payment, and OrderAggregate without information about that finished payment - how can I push OrderAggregate to the correct state (register that payment completion)?

sygnowskip avatar Jun 15 '18 09:06 sygnowskip

@sygnowskip I had hoped to finish it this week, but early next week seems more realistic. My evenings have been filled with non-EventFlow stuff all week.

If you need to do edits to aggregates without using commands, then you can use IAggregateStore.UpdateAsync(...)

As for handling exceptions in sagas, you could implement ISagaErrorHandler with any specific handling you need. The default doesn't do anything.

rasmus avatar Jun 15 '18 10:06 rasmus

@rasmus

Normal flow: PaymentAggregate -> Event: PaymentCompleted -> OrderSaga -> Command: CompleteOrder -> OrderAggregate

Flow with exception: PaymentAggregate -> Event: PaymentCompleted -> OrderSaga (EXCEPTION)

Is there any possibility to reapply PaymentCompleted event and excute CompleteOrder in OrderAggregate? Or how could I achieve that?

sygnowskip avatar Jun 15 '18 11:06 sygnowskip

@LUKE-JNS PR with support for .NET Core is already merged: https://github.com/eventflow/EventFlow/pull/445

sygnowskip avatar Jun 21 '18 10:06 sygnowskip

Hello there!

We hope you are doing well. We noticed that this issue has not seen any activity in the past 90 days. We consider this issue to be stale and will be closing it within the next seven days.

If you still require assistance with this issue, please feel free to reopen it or create a new issue.

Thank you for your understanding and cooperation.

Best regards, EventFlow

github-actions[bot] avatar Apr 08 '23 13:04 github-actions[bot]

Hello there!

This issue has been closed due to inactivity for seven days. If you believe this issue still needs attention, please feel free to open a new issue or comment on this one to request its reopening.

Thank you for your contribution to this repository.

Best regards, EventFlow

github-actions[bot] avatar Apr 16 '23 09:04 github-actions[bot]