Skip to content

smcvb/goto19

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoTo Amsterdam 2019

How to Build CQRS and Event Sourcing Application with Axon and Pivotal Cloud Foundry

By: Ben Wilcock (Pivotal) & Steven van Beelen (AxonIQ)

Description

Axon Trader is a new open-source reference architecture that demonstrates how to deliver "evolutionary" microservice applications to production in minutes.

This repository provides a demo Wallet application following a similar route as the Axon Trader application, used during a live coding presentation at GoTo Amsterdam 2019.

As such, this sample app utilizes both Spring Boot and Axon Framework to provide a small use case of how CQRS, Event Sourcing and DDD can be incorporated.

Project Traversal

Each step has it's own branch, allowing you to:

  • Check out the branch you are interested in.
  • Perform a git reset --hard step# to reset your current branch.

This serves as a back-up during the presentation and as a convenience method for any one interested in this sample, as it makes traversing the taken steps easier.

The following steps have been defined for this project:

  1. The introduction of commands and events to the core-api.
  2. The basic Command Model as an Aggregate, the Wallet, contained in it's own package.
  3. A means to dispatch commands through a controller in the UI folder.
  4. A simple Query Model, the WalletView, which an Event Handling class updates based on events.
  5. Introduction of queries and query handlers, respectively dispatched by the UI and handled by the projector.

Demo Commands

Pushing an application (with a manifest.yml)

cf push

Check the application...

curl -X GET wallet.cfapps.io/hello

Initialise the application...

curl -X GET wallet.cfapps.io/command

Creating a MySQL Database (on PWS)

cf create-service cleardb spark mysql

Binding a database

cf bind-service wallet mysql

Initialise the application...

curl -X GET wallet.cfapps.io/command

Query for Wallets...

curl -X GET wallet.cfapps.io/query/wallets

Wallet Manifest

applications:
- name: wallet
  path: target/wallet-0.0.1-SNAPSHOT.jar
  instances: 1
  routes:
  - route: wallet.cfapps.io

About

GoTo Amsterdam 2019 - Demo Wallet Application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published