Using Edomata for real-time streaming use case #210
-
Hi Can we use this library for an architecture something like this: Using this library, an application Or, do we Secondly, there is little confusion relating to the implementation of Edomata, the app that uses it can support So to implement both Event Sourcing and CQRS in our entire project, the architecture would be like this: App --> immutable Write database (Event store).. Is this how things are working in Edomata? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi
Yes, you can; but if you want to use CDC only to read data, you can also read the journal and outbox using the backend itself. Here is the documentation.
Probably no. The default configuration of edomata backend has a builtin cache that is enabled by default and doesn't interact with database unless for writing or in case of cache misses, and I've been able to easily reach a couple of thousands of commands per second using a single machine in a few of my projects that needed it. That being said, anything performance related depends on your specific problem at hand and I can't give certain answers. Also, in case you needed to have a custom storage strategy or implementation, you can simply implement the
No, that's not correct. Edomata is only a toolkit, and you can use it however you want and doesn't have any opinions on how to organize your overall application. You can have several As a matter of fact, the project's example has done exactly this! There is an account aggregate that is ES and an order aggregate that is CQRS, both in the same application. They don't even use different connection pools, and the users can't distinguish the implementation details either.
You can use the backend to read the changes and events in real-time as mentioned above and there is no need to delve into to the database stuff. I hope I answered all your questions, if there are any missing let me know, and also if there are new questions as well. |
Beta Was this translation helpful? Give feedback.
-
Hi @hnaderi Thank you for the detailed response. I got to understand things to a certain extent. I have some more queries though:
So this means an application using Edomata is capable of doing both things: We will read events from the backend If yes, how can I make sure that Looks like I need to take care of myself because Edomata is not doing any CRUD stuff, right? Wondering how can I accomplish it.. I am very much new to Scala, will do the coding for the first time.
Okay this means I'd use the Edomata backend to read the events and then use any DB library/driver to write those events in the db. I am looking forward to use Cassandra. What do I need to do, implement StorageDriver and use the Cassandra-Java driver?
Microservices 1, 2 and 3: Writing Product aggregate, Pricing aggregate and User aggregate events to Event store (using the Microservice 4.. Reading the Event store (all or few aggregates) and sending the result to the browser. In Microservice 4, do I need to use the Edomata - CQRS thing? What exactly is Edomata - CQRS doing.. what role does Edomata-backend play in it? If I need to do these two (
Hopefully I can use gRPC with Edomata. Which library would you recommend, I want to implement a gRPC enabled microservice.
Thank you again |
Beta Was this translation helpful? Give feedback.
-
Things are more clear than before. After learning some more FP and going through your code, I will try to connect the remaining dots. Yeah, I am new to.. functional programming, Scala, and event sourcing. The main reason for switching to Scala is only one: it has great functional support than Java and Kotlin has. And I want to do my next project using FP, OO just sucks.
I full agree with this fact. We need to implement the Saga orchestration pattern for this.. using a library like Temporal. IBut it will definitely slow down the application. The CDC pattern can solve this problem.. Write to db first and use CDC that reads the db changes from its transactional log and write them to Kafka. Thank you once again :) Will let you know if I decide to use this library. |
Beta Was this translation helpful? Give feedback.
Yes, you can read both the events and notifications once they are commited.
It depends on how you process the data after reading.
Each event in the journal has a version, seq nr. and an Id you can use to implement idempotency.
Also, for notifications, the default behavior is to only read the notifications that are not marked as read yet. (like a kafka manual ack consumer)