These are chat archives for RBMHTechnology/eventuate

3rd
Mar 2016
Alexander Semenov
@Tvaroh
Mar 03 2016 06:02
@krasserm it turns out I need to use a transient graph database for my write model having a subset of data of my query graph database. I can't make it out of case classes. Is it okay from your perspective? Of course, I will need to maintain in-memory state when updating view db.
Martin Krasser
@krasserm
Mar 03 2016 08:41
@Tvaroh not sure I fully understand your question but, yes, writers can be stateful and you can use whatever data structure you like to maintain internal writer state, as long as you only modify it within the event handler. When the writer is (re)started, use the read and readSuccess methods to initialize/recover internal state. Does that help?
Alexander Semenov
@Tvaroh
Mar 03 2016 08:43
@krasserm can I validate commands against a stateful writer state?
Martin Krasser
@krasserm
Mar 03 2016 08:51
@Tvaroh sure, this is possible with all Eventsourced* abstractions.
Alexander Semenov
@Tvaroh
Mar 03 2016 08:51
okay, thanks for the help
Martin Krasser
@krasserm
Mar 03 2016 08:52
you're welcome