I think that Akka Persistence lacks in some areas that are essential for
using CQRS
with DDD aggregates effectively (without a lot of pain):
1) Ability to read persistent actor messages by type of Actor. This can be
as simple
as a key prefix that represents a "category/tag/topic",
e.g. <topic>-<persistenceId>. Essentially an embedded secondary index.
2) As there is no global sequence number for events across all messages in
the same
way there is for messages of a single persistent actor; there should be
a way to track the logical positions of messages. GetEventStore uses a
similar
approach.
1: Gives us ability to read across all events from a persistent actor
family, e.g. customers.
2: Gives us ability, by way of 1, to do catch-up-subscription of all
events from persistent
actors of same type, say customers, and keep track of position. This is
very useful for
maintaining a read model and integration with other systems.
I have tried many approaches and to mention a few:
a) One persistent actor for a "topic".
b) Join streams using AtLeastOnceDelivery in individual persistent actors
to
a "topic" aggregator.
c) Using a persistent actor as a journal for a "topic" and replaying that
into views, filtering events produced by "topic" siblings.
All of the above introduce unnecessary complications and work-around
gymnastics such as
dealing with state size and archival (a), worrying about out-of-order (b)
and using
background workers that move views by way of snapshotting forward (c). All
of this
because AP does not provide a way to achieve 1) and 2).
>From my point of view it is evident that AP lacks some fundamental and
essential
capabilities in order to get a decent CQRS/DDD/ES setup.
--
>>>>>>>>>> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.