All Projects → holinov → zio-event-sourcing

holinov / zio-event-sourcing

Licence: other
Purely functional concurent and scalable persistance layer implementing CQRS

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to zio-event-sourcing

delta
DDD-centric event-sourcing library for the JVM
Stars: ✭ 15 (-55.88%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
Pos
Sample Application DDD, Reactive Microservices, CQRS Event Sourcing Powered by DERMAYON LIBRARY
Stars: ✭ 207 (+508.82%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
Vertex
Vertex is a distributed, ultimately consistent, event traceable cross platform framework based on Orleans, which is used to build high-performance, high throughput, low latency, scalable distributed applications
Stars: ✭ 117 (+244.12%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
Go Cqrs All
All-in-one collection for Go CQRS / ES / DDD examples
Stars: ✭ 39 (+14.71%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
go-eventually
Idiomatic Event Sourcing in Go
Stars: ✭ 76 (+123.53%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
Asombroso Ddd
Una lista cuidadosamente curada de recursos sobre Domain Driven Design, Eventos, Event Sourcing, Command Query Responsibility Segregation (CQRS).
Stars: ✭ 41 (+20.59%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
Event Sourcing Jambo
An Hexagonal Architecture with DDD + Aggregates + Event Sourcing using .NET Core, Kafka e MongoDB (Blog Engine)
Stars: ✭ 159 (+367.65%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
Awesome Elixir Cqrs
A curated list of awesome Elixir and Command Query Responsibility Segregation (CQRS) resources.
Stars: ✭ 467 (+1273.53%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
akka-persistence-foundationdb
A replicated Akka Persistence journal backed by FoundationDB
Stars: ✭ 43 (+26.47%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
fee-office
A DDD, CQRS, ES demo application
Stars: ✭ 35 (+2.94%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
Rails event store
A Ruby implementation of an Event Store based on Active Record
Stars: ✭ 947 (+2685.29%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
VehicleTracker
Vehicle Tracker with Microservice example
Stars: ✭ 70 (+105.88%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
Symfony 5 Es Cqrs Boilerplate
Symfony 5 DDD ES CQRS backend boilerplate
Stars: ✭ 759 (+2132.35%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
Commanded
Use Commanded to build Elixir CQRS/ES applications
Stars: ✭ 1,280 (+3664.71%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
Eventstore
Event store using PostgreSQL for persistence
Stars: ✭ 729 (+2044.12%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
Booster
Booster Cloud Framework
Stars: ✭ 136 (+300%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
Event Sourcing Cqrs Examples
Event Sourcing and CQRS in practice.
Stars: ✭ 265 (+679.41%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
Conduit
RealWorld example backend implementing the CQRS/ES pattern in Elixir and Phoenix
Stars: ✭ 253 (+644.12%)
Mutual labels:  cqrs, event-sourcing, cqrs-es
stem
Event sourcing framework based on ZIO and pluggable runtime (currently working with Akka cluster)
Stars: ✭ 22 (-35.29%)
Mutual labels:  cqrs, event-sourcing, zio
flighthub
Flight ticket booking system implemented with CQRS and ES.
Stars: ✭ 26 (-23.53%)
Mutual labels:  cqrs, event-sourcing, cqrs-es

ZIO Event Sourcing

ZIO EventSourcing is library trying to adopt one of CQRS implementations to ZIO way.

Description

Most of application could be seen as sequence of user initiated events that change state of the entire system. Keeping this in mind we could say that all entire system state could be restored just by playback of whole history of user initiated events, or some times just a part of them to business-logic processors (if they are "state less"). But also we need to keep in mind that modern time our services need to be fault-tolerant, scalable and able to adopt to always changing requirements of Clients and Business. And also we have requirement to provide our marketing team tools to allow to sell our product and keep KPI progress on it.

Combining previous requirements we have that modern system:

  • Should not lose any of "user initiated data"
  • Should be able to recover from most possible ways corrupting "customer data"
  • Should have natural ability to scale on either "user input/output" or marketing analytics data

Event sourcing addresses this issues by separating "read side" and "write side" It has "event journal" which stores incoming events ordered in time for each entity ("Aggregate"). When entity state needs to be accessed "Aggregate" loads stored events and computes totals state

Concepts

  • Everything happening to system is "event"
  • Every "interesting" event is recorded to EventJournal
  • Every successful persisted event changes calculated state of Aggregate
  • Every state could be reassembled by playback of all eventgits to specific Aggregate
  • Any of EventJournals could be assembled to multiple Aggregates

Benefits

  • Separating read and write sides eliminates all possibilities of "race conditions" in concurrent environments (all changes are being processed on stable order)
  • Ability to recover from "cold data"
  • Ability to add new type of business or analytics aggregates at any time
  • Possibility to take most advantages from Cassandra\Scylla\Aerospike storages

Drawbacks

  • To get current state of aggregate you need to read all its data (addressed at "read side" by snapshot storage or other caching techniques)
  • In real life you will need to have some "distributed tracing" support to debug issues
  • Having some problems doing distributed transactions (addressed by zio-saga)

Usage

resolvers += Resolver.bintrayRepo("holinov", "maven") 
libraryDependencies ++= Seq(
 "FruTTecH" %% "zio-event-sourcing" % "0.1.10",
 "FruTTecH" %% "zio-event-sourcing-serializer-protobuf" % "0.1.10",
 "FruTTecH" %% "zio-event-sourcing-file-store" % "0.1.10",
 "FruTTecH" %% "zio-event-sourcing-cassandra-store" % "0.1.10"
)

Roadmap

  • Publish to Bintray
  • Publish to Maven Central
  • Storage examples for Cassandra/Scylla
  • Storage examples for zio-rocksdb
  • Optional state snapshot storage
  • zio-saga example
  • zio-kafka example
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].