Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

ygrenzinger/bank-account-kotlin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bank Account Kata in Kotlin

There is a simple implementation in the simple package and an advanced CQRS / ES version in CQRS package.

This is the schema explaining quickly the ES/CQRS version ES / CQRS Architecture

When a user send a command, it's sent to the aggregate. The aggregate should be unique in the whole system (even distributed). To that a fully functional system it would need some command bus or router.

The command is validated by the aggregate against business rules which generate a list of "pure" events (process function). These events are first saved inside the event store to ensure durability and then applied directly to the aggregate (apply function). At the same time, the events are pushed by the event bus to the attached views.

The money transfer is implemented with specific events, business rules (can't have negative amount) and compensating events if the deposit money part fail for some reasons.

Any way to improve it would be welcomed! :)
Especially the generics use inside Aggregate, View or EventProcess

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages