Example application for my #qconsf presentation about building microservices with event sourcing and CQRS

My presentation Building microservices with event sourcing and CQRS describes the challenges of functionally decomposing a domain model in a microservices based application. It shows that  a great way to solve those problems is with an event-driven architecture that is based on event sourcing and CQRS.

The presentation uses  a simple banking application, which transfers money between accounts, as an example. The application has the architecture shown in the following diagram:

Banking application architecture

The application consists of four modules that communicate only via events and can be deployed either together in a monolithic application or separately as microservices.

The four modules are as follows:

  • Accounts – the business logic for Accounts
  • Money Transfers – the business logic for Money Transfers
  • Account View Updater – updates a denormalized view of Accounts and Money Transfers in MongoDB
  • Account View Reader – queries the denormalized view

You can find the source code and documentation for the example application in this github repository. There are currently two versions of the application: Java+Spring Boot and Scala+Spring Boot. I plan to publish a Scala/Play version shortly. The application uses a simple, embedded event store.

Watch the presentation (slides+video), and take a look at the source code and documentation. It would be great to get feedback on the programming model.

This entry was posted in cqrs, event-driven architecture, microservices and tagged , , . Bookmark the permalink.

4 Responses to Example application for my #qconsf presentation about building microservices with event sourcing and CQRS

  1. Had a look at your example project @Github. It’s using your own event store library. Is the source for this one also available somewhere (did not find anything on your Github profile)? Did you consider using the Axonframework?

  2. ceracm says:

    Any thoughts about the example project?

    The source for the event store library isn’t yet available. I wanted to get the example out there first. Stay tuned.

    I’ve looked at Axon from time to time. Have you used it?

  3. andrea says:

    +1 for the sources of the eventstore, library at least.

    • ceracm says:

      At some point I’ll open source the client libraries.

      In the meantime, let me know whether you want access to the event store that I’ve been working on.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s