All Projects → Freyskeyd → chekov

Freyskeyd / chekov

Licence: other
A CQRS/ES framework for building application in Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to chekov

nota
"None Of The Above" - is going to be a secure online voting system, intended to give the electorate better choices. It always adds one additional choice to anything to be voted on: If more than 50% of voters choose "None of the Above", the election is considered null and void.
Stars: ✭ 17 (-19.05%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
Eshoponcontainersddd
Fork of dotnet-architecture/eShopOnContainers in full DDD/CQRS design using my own patterns
Stars: ✭ 126 (+500%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
Todomvc Ddd Cqrs Eventsourcing
Implementation of basic Todo app via tastejs/todomvc in C#/Typescript with eventsourcing, cqrs, and domain driven design
Stars: ✭ 134 (+538.1%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
eventsourcing-go
Event Sourcing + CQRS using Golang Tutorial
Stars: ✭ 75 (+257.14%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
les
Go directly from an event storming to a working API: Event Markdown / Markup validation & NodeJS CQRS/ES application builder.
Stars: ✭ 48 (+128.57%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
Go Cqrs All
All-in-one collection for Go CQRS / ES / DDD examples
Stars: ✭ 39 (+85.71%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
delta
DDD-centric event-sourcing library for the JVM
Stars: ✭ 15 (-28.57%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
Eventflow
Async/await first CQRS+ES and DDD framework for .NET
Stars: ✭ 1,932 (+9100%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
Restairline
DDD+CQRS+EventSourcing+Hypermedia API+ASP.NET Core 3.1+Masstransit+terraform+docker+k8s
Stars: ✭ 243 (+1057.14%)
Mutual labels:  cqrs, eventsourcing
Pos
Sample Application DDD, Reactive Microservices, CQRS Event Sourcing Powered by DERMAYON LIBRARY
Stars: ✭ 207 (+885.71%)
Mutual labels:  cqrs, cqrs-es
Conduit
RealWorld example backend implementing the CQRS/ES pattern in Elixir and Phoenix
Stars: ✭ 253 (+1104.76%)
Mutual labels:  cqrs, cqrs-es
Library
A microservice project using .NET Core 2.0, DDD, CQRS, Event Sourcing, Redis and RabbitMQ
Stars: ✭ 122 (+480.95%)
Mutual labels:  cqrs, eventsourcing
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 (+457.14%)
Mutual labels:  cqrs, cqrs-es
Bifrost
This is the stable release of Dolittle till its out of alpha->beta stages
Stars: ✭ 111 (+428.57%)
Mutual labels:  cqrs, eventsourcing
Booster
Booster Cloud Framework
Stars: ✭ 136 (+547.62%)
Mutual labels:  cqrs, cqrs-es
Quiz
Example real time quiz application with .NET Core, React, DDD, Event Sourcing, Docker and built-in infrastructure for CI/CD with k8s, jenkins and helm
Stars: ✭ 100 (+376.19%)
Mutual labels:  cqrs, eventsourcing
Eventflow.example
DDD+CQRS+Event-sourcing examples using EventFlow following CQRS-ES architecture. It is configured with RabbitMQ, MongoDB(Snapshot store), PostgreSQL(Read store), EventStore(GES). It's targeted to .Net Core 2.2 and include docker compose file.
Stars: ✭ 131 (+523.81%)
Mutual labels:  cqrs, eventsourcing
Goes
Go Event Sourcing made easy
Stars: ✭ 144 (+585.71%)
Mutual labels:  cqrs, eventsourcing
Event Sourcing Jambo
An Hexagonal Architecture with DDD + Aggregates + Event Sourcing using .NET Core, Kafka e MongoDB (Blog Engine)
Stars: ✭ 159 (+657.14%)
Mutual labels:  cqrs, cqrs-es
Eventapis
eventapis is a Java based Event Sourcing framework which can be benefited by the teams who are planning to make CQRS transitions with minimum learning curve and ease of adaptation.
Stars: ✭ 147 (+600%)
Mutual labels:  cqrs, eventsourcing

Chekov

A CQRS/ES framework for building application in Rust

Actions Status Coverage Status dependency status Crates.io doc.rs doc-latest

Table of Contents


Features

  • Postgres EventStore backend
  • Dispatch Command to Aggregate or CommandHandler
  • Generate Event from Aggregate and persist them
  • Apply Event to Aggregate
  • Store and notify Event with subscriptions
  • Dispatch Event to EventHandler

Getting started

Choosing an EventStore backend

Chekov works only with Postgres backend for now (and InMemory for test purpose). The choice is easy to make!

But some more backends need to be implemented, see the related issue.

Defining Aggregates

An Aggregate is a struct that hold a domain state. Here's an example of a UserAggregate:

#[derive(Default, Aggregate)]
#[aggregate(identity = "user")]
struct User {
    user_id: Option<Uuid>,
    account_id: Option<Uuid>,
}

/// Define an Executor for the `CreateUser` command
/// The result is a list of events in case of success
impl CommandExecutor<CreateUser> for User {
  fn execute(cmd: CreateUser, _state: &Self) -> Result<Vec<UserCreated>, CommandExecutorError> {
    Ok(vec![UserCreated {
      user_id: cmd.user_id,
      account_id: cmd.account_id,
    }])
  }
}

/// Define an Applier for the `UserCreated` event
/// Applier is a mutation action on the aggregate
#[chekov::applier]
impl EventApplier<UserCreated> for User {
  fn apply(&mut self, event: &UserCreated) -> Result<(), ApplyError> {
    self.user_id = Some(event.user_id);
    self.account_id = Some(event.account_id);

    Ok(())
  }
}

Defining Commands

You need to create a struct per command, any type of struct can implement Command but we advise to use struct for a better readability.

A command can only produce (or not) one type of events and it targets a single Aggregate. A command must have a single and unique identifier that is used to route the command to the right target.

#[derive(Debug, Command)]
#[command(event = "UserCreated", aggregate = "User")]
struct CreateUser {
    #[command(identifier)]
    user_id: Uuid,
    account_id: Uuid,
}

Defining Events

An Event can be a struct or an enum.

#[derive(Event, Deserialize, Serialize)]
struct UserCreated {
    user_id: Uuid,
    account_id: Uuid,
}

Defining Saga

Not implemented yet

FAQ

Does Chekov is production ready ?

No its not. Some critical part of the project are still not implemented and a lot of code needs to be refactored before that.

Need Help?

Feel free to open issue in case of bugs or features requests. Discussions are also a great starts if you have issue that are not bugs nor features requests.

Contributing

The project is really early staged and have a lot of pending tasks, one major tasks is to produce a roadmap or some issues that can be used to expose the project vision. Feel free to open a Discussions around it if you want !

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].