Skip to content

Event sourcing service cluster (Kotlin, Akka, Spring Boot, GitHub Actions)

Notifications You must be signed in to change notification settings

Linkshegelianer/Kotlin-Spring-Event-sourcing-service-app

Repository files navigation

Event sourcing service cluster

Kotlin CI Maintainability

This repository contains study project for distributed scalable service cluster that is based on the event sourcing pattern.

Event Sourcing is a persistence approach based on storing a stream of events instead of the current state of an object.

   +-------------------------------+    +---------------+    +-------------+
   |           Message             |---►|    Command    |---►|    Event    |
   ---------------------------------    -----------------    ---------------
   | Contains:                     |    | AddObject,    |    | Contains:   |
   | ClassName,                    |    | DeleteObject, |    | ClassState, |
   | ObjectType,                   |    | GetAllObjects |    | ClassEvent  |
   | ObjectActionType (ADD/DELETE) |    +---------------+    +-------------+
   +-------------------------------+
  • Events from event sourcing pattern are messages informing about the change in the state of the object.
  • RabbitMQListener parses received String to ObjectActionMessage and sends it to Service.
  • Service operates the state of the object and sends action to Actor.
  • Actor processes the messages in one thread via event handlers.
  • Controller gets the current state of the classes.
                      +------------------------+     +----------------------+
                      |    RabbitMQListener    |◄----|    RabbitMQConfig    |          
                      +------------------------+     +----------------------+
                                 | 
                                 ▼
                      +---------------------+    +------------------+
                      |    Class Service    |---►|    Controller    |
                      +---------------------+    +------------------+
                                ▲
                                | 
                                ▼
+----------------+    +-------------------+     +------------------+
| Event Sourcing |---►|    Class Actor    |◄----|    AkkaConfig    |        
|   Properties   |    +-------------------+     +------------------+
+----------------+                             

Technologies:

  1. Kotlin + Gradle 7.1.1
  2. Spring Boot
  3. Akka

About

Event sourcing service cluster (Kotlin, Akka, Spring Boot, GitHub Actions)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published