These are chat archives for RBMHTechnology/eventuate

7th
Jul 2016
Martin Krasser
@krasserm
Jul 07 2016 07:56
Eventuate 0.8-SNAPSHOT now has an experimental Spark adapter (http://rbmhtechnology.github.io/eventuate/reference/adapters.html#spark-adapter) and is compatible with Cassandra 3.x. We welcome your feedback!
Oliver Wetterau
@owetterau
Jul 07 2016 13:34
Hello, I hope it is ok to ask a more general question here. I have a EventsourcedWriter that writes into Cassandra and Elasticsearch. But the events do not contain all the information needed. So I am currently asking other EventsourceActors (Akka Ask) to get the related data. Asfaik, this might lead to incomplete writes if the Actors that were ask do not reply for (e.g. network problem) reasons. Is there another or better way to do this?
Volker Stampa
@volkerstampa
Jul 07 2016 13:59
The idea is actually that your events do contain all the information needed. The persistent read-model (in your case in Cassandra and Elasticsearch) is a projection on the the events consumed by the writer. If you incorporate external information (e.g. through ask) the state of your model depends on external resources that may change over time and thus make rebuilding the read-model from the event log impossible.
Oliver Wetterau
@owetterau
Jul 07 2016 14:11
In this special case I would like to write a price list entry (product, brand, price etc.). When an event BrandNameChanged occurs, this writer should update the price list entry. But if I had to provide all information for this in all events that might occur in the different actors, it would be impossible to handle that. Hence, I decided to combine the necessary information the aforementioned event occurs. I assume that this should be a quite common problem that other - with more experience in event sourcing - might have solved already. Can you give me a hint where to look?
This message was deleted
Volker Stampa
@volkerstampa
Jul 07 2016 14:26
Not sure If I can follow you, when a BrandNameChanged event occurs you only want to update the brand-name, right? And that should be included in your event. Regarding event sourcing in general: In microsofts CQRS-Journey is an Intorduction into Event Sourcing that is certainly a good read.
Oliver Wetterau
@owetterau
Jul 07 2016 14:31
Actually what the writer should do is to update all price list entries where products of that brand are included as the entry will include all that information. What I could do is to create a really large aggregate based on all these events than everything would work. But that does not seem to be a terribly good idea.
I already read that book but do not remember that it contained something that would help with this special case. But I will have a look again.
Volker Stampa
@volkerstampa
Jul 07 2016 14:36
Cant you find your affected entries by querying your read-model itself (i.e. Cassandra/Elasticsearch)? An external resource might not be consistent with your read-model and thus you would update the wrong entries.
Oliver Wetterau
@owetterau
Jul 07 2016 14:43
Until now I have not put all data into the read-model. One of the reasons being exactly that consistency issue. Hence, when e.g. a ProductAddedToPriceList event occurs, I am currently sending an „?/Ask" to the involved Product, Brand, PriceList etc. actors to retrieve all the data necessary to build a price list entry in the read-model.
Oliver Wetterau
@owetterau
Jul 07 2016 15:45
Many thanks for your replies! After thinking about it, I think that I need to change the domain model so that the events can be created as suggested.
e-Evolution
@e-Evolution
Jul 07 2016 16:19
Hi Martin @krasserm thank a lot to Eventuete , I dowloand and testing your demo code , I learned a lot, if I want implement other persistence source as http://orientdb.org how should starting , what are of trait that need implement ?
e-Evolution
@e-Evolution
Jul 07 2016 16:27
Thank alot
Volker Stampa
@volkerstampa
Jul 07 2016 17:38
@owetterau Your are very welcome. Glad that I could help :-)