I should probably go back and read some of the threads about Akka
persistence and CQRS/ES.

The system I'm working on has actors (let's call them Monitors) that
monitor event data and generate Alerts. Both Monitors and Alerts are
entities with persistent state. In DDD terms, I think of them both as
Aggregates, with the Monitor raising GenerateAlert  or UpdateAlert domain
events.

 I would love to make Monitor an event-sourced PersistentActor at some
point, but it's not currently. Its state is the latest Alert, and a
timestamp. Without transactions, there's a consistency challenge in saving
the Monitor and the Alert when one is generated or needs to be updated (eg.
cleared).

Vaughn Vernon's latest blog post enthuses about Postgres JSON as an
aggregate store because you can update the aggregate and store the domain
event in a transaction.

https://vaughnvernon.co/?p=942

How would I approach my example with event-sourced Akka persistence? Will
there be a way to durably raise domain events? Should I switch to thinking
of the Alerts as part of the Monitor aggregate, record them with regular
persistence events and use views to build a read model for Alerts? I wonder
how I would tackle this with a NoSQL store *without* event sourcing or
transactions, but I guess that's one for the DDD list.

Do you agree that making a distinction between domain events and aggregate
persistence events is useful even in an event sourced world?

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to