r/fintechdev • • 2d ago

Event-driven (choreography) java framework for monolith/microservices

I know this may be not right subreddit for this, but someone may find it useful.

I am working on the framework that helps building event-driven java application. I am still working on edge cases. Here is the gist: https://gist.github.com/mananvpanchal/25aeb37b04da7399adbcde2b251e0bc5

I will appreciate if you spare some time to read it.

Thanks

1 Upvotes

3 comments sorted by

1

u/Particular-Gap-9518 16h ago

I read ur gist, where did u get such an idea? any inspo or something?

1

u/mananvpanchal 15h ago

Thanks for reading!

I was thinking about event-carried state transfer, and CQRS, where events writes/creates data model that query can read later. Someone may need lots of events to create read model, and that all events can occur in any order. How can someone manage the logic with any combination of event orders. One thing was sure that I somehow need to wait for events, once everything is there the logic could be way easier.

I tried searching for same pattern but Axon saga wasn't supporting it exactly this way. With Axon, we still need to check

if(event1 !=null && event2 !=null) {
  //do logic
}

I wanted cleaner approach like

on(Event1 e1, Event2 e2, Event3 e3) {
  //do logic
}

So, I tried creating it. Most of the stuff is done. Still figuring out about timeout and retry.

2

u/Particular-Gap-9518 15h ago

oh ok, nice ig, reminds me of OS concepts, lock system and process management and resource allocation lol