Nieuws8 maart 2015

Activator Template

We (Trivento) proudly announce that we have released an activator template to describe how you can use Akka (with Scala) to build a distributed application that uses the CQRS (Command Query Responsibility Segregation) & Event Sourcing patterns. An Activator Template is a great way to write a tutorial. There are currently 256 templates which describe various topics. Our template can be found at:

https://typesafe.com/activator/template/akka-with-cqrs-eventsourcing

 

CQRS & Event Sourcing

Recently CQRS and Event Sourcing are getting more and more attention. With CQRS you separate the command handling from the query handling and with Event Sourcing you to store all changes to your system as events as opposed to changing state in the database. The main advantage of writing applications in a CQRS style is that is resembles the domain of the business much better than 3-tier applications. I find it to be a very good fit with Domain Driven Design.

Akka

Akka is a great framework to build reactive applications and the Akka Persistence module enables you to write applications that use Event Sourcing. It also has tools to separate the Command and Query side and implement the CQRS pattern. When you try to implement an application with Akka Persistence in a CQRS&Event Sourcing style, you probably run into some “limitations” in processing the events on the read side. Most notably, trying to give an overview over multiple aggregates. In a PersistentView it is only possible to replay the events of a single aggregate in a persistent view.

Please let us now if you have any comments or questions regarding the template. You can contact me directly via the envelope below, or add a comment to this post.

Links: