Hi Ashley,

On Mon, Jun 2, 2014 at 4:54 AM, Ashley Aitken <[email protected]> wrote:

>
> Howdy All,
>
> I've been reading lots of threads on the Akka User mailing list and pull
> requests and blog posts within the community but I am confused about what
> currently are the "best practices" for:
>
> 1. Distributed and Resilient Pub-Sub within Akka
>
> It seems to me that a resilient pub-sub is a key component for a CQRS
> approach and for a distributed system this would also need to be
> distributed.
>

Why do you assume that PubSub plays a key role? CQRS means that events flow
reliably from the write model to the read model, which most naturally
occurs via the journal, i.e. using replay streams (upcoming feature in the
Akka Streams project) or Views.


>  I believe the event system in Akka is currently per-node and not
> resilient.  What is the current best practice for resilient distributed
> pub-sub for CQRS with Akka?
>

What do you define as “resilient” in the context of PubSub?


>
> Please note the best practice may be to use a third-party distributed and
> resilient pub-sub technology and I am open to that (but I would prefer to
> stay with something within Akka or the Typesafe platform).
>
> 2. Process Managers
>
> What is the best approach to implementing process managers (for sagas) in
> CQRS with Akka.  I am quite a novice in this area so the answer may be
> obvious but I'm wondering about whether it's best to use singleton actors,
> processors, eventsourced processors, finite state machine etc.
>
> It seems to me that process managers in a distributed system would also
> require distributed and resilient pub-sub (as discussed above) to work well.
>

A Saga is typically a persistent actor (currently EventsourcedProcessor,
soon to be renamed to PersistentActor for brevity and consistency) that
communicates with specific other actors representing aggregate roots, I see
no need to involve PubSub in this process. What you might encounter is
ClusterSharding for spreading out your ARs across a cluster.


>
> 3. Denormalisation of Views
>
> I've discussed this previously with Martin and others as a result of the
> restriction of Views to track one processor.  Ideas like using a database
> with triggers within the view model to update denormalised data were
> suggested but I am wondering if this is the best practice for now?
>

Can you explain what exactly this question means? It seems that it is
targeted purely at RDBMS usage, but I might be misunderstanding what you
are getting at.


>
> I'm thinking that again distributed and resilient pub-sub (as discussed
> above) may be another way to achieve this.
>
> Sorry if I have missed some crucial documentation or posts.  I've probably
> seen most discussion relating these to the questions but I'm somewhat
> confused as some of the posts are older and others discuss solutions
> without Akka Persistence (I think).
>

Widespread use of CQRS/ES is quite young (compared to traditional RDBMS
usage), so you are contributing to our progress by asking these questions.
Ideally we’ll have comprehensive documentation for these issues collected
when 2.4 comes out.

Regards,

Roland


>
> Thanks in advance for any suggestions.
>
> Cheers,
> Ashley.
>
>
>  --
> >>>>>>>>>> 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.
>



-- 
Akka Team
Typesafe - The software stack for applications that scale
Blog: letitcrash.com
Twitter: @akkateam


On Mon, Jun 2, 2014 at 4:54 AM, Ashley Aitken <[email protected]> wrote:

>
> Howdy All,
>
> I've been reading lots of threads on the Akka User mailing list and pull
> requests and blog posts within the community but I am confused about what
> currently are the "best practices" for:
>
> 1. Distributed and Resilient Pub-Sub within Akka
>
> It seems to me that a resilient pub-sub is a key component for a CQRS
> approach and for a distributed system this would also need to be
> distributed.  I believe the event system in Akka is currently per-node and
> not resilient.  What is the current best practice for resilient distributed
> pub-sub for CQRS with Akka?
>
> Please note the best practice may be to use a third-party distributed and
> resilient pub-sub technology and I am open to that (but I would prefer to
> stay with something within Akka or the Typesafe platform).
>
> 2. Process Managers
>
> What is the best approach to implementing process managers (for sagas) in
> CQRS with Akka.  I am quite a novice in this area so the answer may be
> obvious but I'm wondering about whether it's best to use singleton actors,
> processors, eventsourced processors, finite state machine etc.
>
> It seems to me that process managers in a distributed system would also
> require distributed and resilient pub-sub (as discussed above) to work well.
>
> 3. Denormalisation of Views
>
> I've discussed this previously with Martin and others as a result of the
> restriction of Views to track one processor.  Ideas like using a database
> with triggers within the view model to update denormalised data were
> suggested but I am wondering if this is the best practice for now?
>
> I'm thinking that again distributed and resilient pub-sub (as discussed
> above) may be another way to achieve this.
>
> Sorry if I have missed some crucial documentation or posts.  I've probably
> seen most discussion relating these to the questions but I'm somewhat
> confused as some of the posts are older and others discuss solutions
> without Akka Persistence (I think).
>
> Thanks in advance for any suggestions.
>
> Cheers,
> Ashley.
>
>
>  --
> >>>>>>>>>> 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.
>



-- 
Akka Team
Typesafe - The software stack for applications that scale
Blog: letitcrash.com
Twitter: @akkateam

-- 
>>>>>>>>>>      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.

Reply via email to