DDD, CQRS & Event Sourcing! Evolutionary Microservices with the Axon Framework

DDD, CQRS, Event Sourcing and Microservices

The concepts of DDD, CQRS and Event Sourcing together form the basis of Axon Framework, and we'll have a look at them first conceptually before jumping into the framework itself. There is nothing Axon specific about these things -for example, the Lagom framework is based on the same ideas.

Although these concepts have been around for a while, they have gotten renewed attention in the past couple of years. The background here seems to be that developers have been rediscovering these concepts in the context of microservices architectures. Therefore, we'll be looking specifically at this relationship.

For DDD (domain-driven design), we'll have a look at the core principles behind it, some of the strategic patterns it describes (like bounded context) and core building blocks (aggregate, repository, domain event). We'll contrast the DDD approach with traditional "layered" architecture and see how DDD provides a more natural transition into microservices architectures.

Regarding CQRS (command-query responsibility segregation), we'll define the pattern, and discuss the core motivations behind it (such as performance). When looking at Event Sourcing, we'll discuss the business drivers for doing it, and the relationship with DDD and CQRS.

Finally, we'll see how combining DDD, CQRS and Event Sourcing give rise to system which distinguishes between 3 types of messages with their own specific routing patterns.

Evolutionary microservices with Axon Framework (with live coding)
We'll start by having a look at the history of Axon Framework, its current global adoption and company backing. Then, we'll have a look at the way that Axon Framework has implemented the core concepts discussed earlier.

An important idea that Axon adds on top of these core concepts is location transparency. All messaging is mediated through a bus, regardless of whether it takes place inside a single JVM or between JVMs. This allows a gradual transition from a monolith towards a microservices systems. This is the evolutionary approach to microservices, also known as "monolith first".

We'll demonstrate this by live coding a small Axon monolith from scratch (using the Spring Boot integration to get started quickly), and then taking it apart into a few microservices.

Speaker



Frans van Buul, Evangelist at AxonIQ

Frans van Buul

Evangelist

Frans is an evangelist at AxonIQ. He works with existing and prospective Axon Framework users, specifically looking at how AxonIQ's products and services can help them be successful.

Also, he tells the world about Axon by speaking at conferences, running webinars, writing blogs, etc. Before joining AxonIQ, Frans was a presales architect representing Fortify, the world's leading application security testing portfolio, having worked as both a Java architect and security consultant before that.

Read more

Location

Markhofgasse 19, Wien, AT

Sign up for our newsletter

monthly updates about new product releases and invitations to AxonIQ events