Skip to content

edward-mamezou/akka-cqrs-es-example-typed

 
 

Repository files navigation

CQRS/Event Sourcing System Example by using Akka

This is a example for CQRS+ES(Event Sourcing).

Concepts

  • DDD-based: The Write API Server has aggregate actors in the domain module.
  • CQRS+ES(Event Sourcing): The Write API Server supports the Command side, The Read API Server supports the Query side.

Status

  • WIP

  • Scala 2.13.8

    • Write API Server is DONE
    • Read Model Updater is TODO
    • Read API Server is TODO
  • Kotlin 1.6.21

    • Write API Server is DONE
    • Read Model Updater is TODO
    • Read API Server is TODO
  • Java 17

    • Write API Server is WIP
    • Read Model Updater is TODO
    • Read API Server is TODO

Note: Akka is implemented in Scala, so even if you use Kotlin or Java, you may need to implement Scala in some parts of your application.

Updates

  • Modified JDK version from temurin-11 to temurin-17, need to set --enable-preview in the environment variable JAVA_OPTS(export JAVA_OPTS='--enable-prewview').

Architecture

Main Framework/Library

  • Akka
    • "com.typesafe.akka" %% "akka-actor-typed"
    • "com.typesafe.akka" %% "akka-cluster-typed"
    • "com.typesafe.akka" %% "akka-cluster-sharding-typed"
    • "com.typesafe.akka" %% "akka-persistence-typed"
    • "com.typesafe.akka" %% "akka-http"
    • "com.lightbend.akka.management" %% "akka-management"
    • "com.lightbend.akka.management" %% "akka-management-cluster-bootstrap"
    • "com.lightbend.akka.discovery" %% "akka-discovery-kubernetes-api"
    • "com.github.j5ik2o" %% "akka-persistence-dynamodb-journal-v2"
    • "com.github.j5ik2o" %% "akka-persistence-dynamodb-snapshot-v2"
  • ULID
    • "org.wvlet.airframe" %% "airframe-ulid"

Scala

  • DI Container
    • "org.wvlet.airframe" %% "airframe"

Kotiln

  • DI Container
    • "org.kodein.di" % "kodein-di-jvm"
  • FP
    • "io.arrow-kt" % "arrow-core"
  • Collection Library
    • "io.vavr" % "vavr-kotlin"

Java

  • DI Container
    • "org.springframework.boot" % "spring-boot-starter"
  • Collection Library
    • "io.vavr" % "vavr"

Debug on Local Environment

AWS Deployment

About

CQRS/Event Sourcing System Example by Akka

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 34.4%
  • Java 27.5%
  • Kotlin 22.0%
  • HCL 8.7%
  • Shell 3.2%
  • Makefile 2.0%
  • Other 2.2%