All Projects → fals → Cqrs Clean Eventual Consistency

fals / Cqrs Clean Eventual Consistency

Licence: mit
CQRS, using Clean Architecture, multiple databases and Eventual Consistency

Projects that are alternatives of or similar to Cqrs Clean Eventual Consistency

Dotnet New Caju
Learn Clean Architecture with .NET Core 3.0 🔥
Stars: ✭ 228 (-7.69%)
Mutual labels:  mongodb, clean-architecture, ddd, cqrs, tdd
Event Sourcing Castanha
An Event Sourcing service template with DDD, TDD and SOLID. It has High Cohesion and Loose Coupling, it's a good start for your next Microservice application.
Stars: ✭ 68 (-72.47%)
Mutual labels:  mongodb, clean-architecture, ddd, cqrs, tdd
Bankflix
Aplicação que simula um banco digital, contendo a área do cliente e administrativa, permitindo depósitos e transferências entre contas do mesmo banco. | Application that simulates a digital bank, containing the customer and administrative areas, allowing deposits and transfers between accounts of the same bank.
Stars: ✭ 82 (-66.8%)
Mutual labels:  redis, mongodb, rabbitmq, ddd, cqrs
EcommerceDDD
Experimental full-stack application using Domain-Driven Design, CQRS, and Event Sourcing.
Stars: ✭ 178 (-27.94%)
Mutual labels:  cqrs, ddd, clean-architecture, netcore
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 (-46.96%)
Mutual labels:  mongodb, rabbitmq, ddd, cqrs
csharp-ddd-skeleton
🦈✨ C# DDD Skeleton: Bootstrap your new C# projects applying Hexagonal Architecture and Domain-Driven Design patterns
Stars: ✭ 67 (-72.87%)
Mutual labels:  cqrs, rabbitmq, ddd, netcore
Eventflow
Async/await first CQRS+ES and DDD framework for .NET
Stars: ✭ 1,932 (+682.19%)
Mutual labels:  events, rabbitmq, ddd, cqrs
OpenSleigh
OpenSleigh is a Saga management library for .NET Core.
Stars: ✭ 198 (-19.84%)
Mutual labels:  events, cqrs, rabbitmq, ddd
Run Aspnetcore Microservices
Microservices on .Net platforms which used Asp.Net Web API, Docker, RabbitMQ, MassTransit, Grpc, Ocelot API Gateway, MongoDB, Redis, PostgreSQL, SqlServer, Dapper, Entity Framework Core, CQRS and Clean Architecture implementation. Also includes Cross-Cutting concerns like Implementing Centralized Distributed Logging with Elasticsearch, Kibana and SeriLog, use the HealthChecks with Watchdog, Implement Retry and Circuit Breaker patterns with Polly and so on.. See Microservices Architecture and Step by Step Implementation on .NET Course w/ discount->
Stars: ✭ 406 (+64.37%)
Mutual labels:  redis, mongodb, rabbitmq, clean-architecture
Pitstop
This repo contains a sample application based on a Garage Management System for Pitstop - a fictitious garage. The primary goal of this sample is to demonstrate several software-architecture concepts like: Microservices, CQRS, Event Sourcing, Domain Driven Design (DDD), Eventual Consistency.
Stars: ✭ 708 (+186.64%)
Mutual labels:  rabbitmq, netcore, ddd, cqrs
All Things Cqrs
Comprehensive guide to a couple of possible ways of synchronizing two states with Spring tools. Synchronization is shown by separating command and queries in a simple CQRS application.
Stars: ✭ 474 (+91.9%)
Mutual labels:  events, mongodb, ddd, cqrs
Stove
Domain Driven Design oriented application framework, meets CRUD needs
Stars: ✭ 160 (-35.22%)
Mutual labels:  redis, rabbitmq, ddd, cqrs
Dotnetcore Microservices Poc
Very simplified insurance sales system made in a microservices architecture using .NET Core
Stars: ✭ 1,304 (+427.94%)
Mutual labels:  rabbitmq, netcore, ddd, cqrs
Messagebus
A MessageBus (CommandBus, EventBus and QueryBus) implementation in PHP7
Stars: ✭ 178 (-27.94%)
Mutual labels:  redis, rabbitmq, ddd, cqrs
Coolstore Microservices
A full-stack .NET microservices build on Dapr and Tye
Stars: ✭ 1,903 (+670.45%)
Mutual labels:  redis, clean-architecture, ddd
Digital Restaurant
DDD. Event sourcing. CQRS. REST. Modular. Microservices. Kotlin. Spring. Axon platform. Apache Kafka. RabbitMQ
Stars: ✭ 222 (-10.12%)
Mutual labels:  rabbitmq, ddd, cqrs
Elmahcore
ELMAH for Net.Standard and Net.Core
Stars: ✭ 127 (-48.58%)
Mutual labels:  asp-net-core, netcore, net-core
Java Ddd Skeleton
♨️ DDD in Java skeleton & examples. Course:
Stars: ✭ 140 (-43.32%)
Mutual labels:  rabbitmq, ddd, cqrs
Interviews
A list of fancy questions I've been asked during the interviews I had. Some of them I ask when interviewing people.
Stars: ✭ 140 (-43.32%)
Mutual labels:  ddd, cqrs, tdd
Thewisedev Mailing
theWiseDev | API for a squeze page to register users on a mailing list and to email them a bonus (written in Node.js and TypeScript in a Clean Architecture). This project can be used as a reference implementation of the Clean Architecture with Node.js and TypeScript.
Stars: ✭ 145 (-41.3%)
Mutual labels:  clean-architecture, ddd, tdd

Guaraci Clean Architecture CQRS with Derived Data

CQRS, using Clean Architecture, multiple databases and Eventual Consistency

Build Status

📑 Detailed information

I also keep more detailed information in my blog, and I going to release weekly to clarify my ideas:

  • [X] CQRS Translated to Clean Architecture
    • [ ] CQRS Deep dive into Commands
    • [ ] CQRS Queries and Materialization
    • [ ] CQRS Consensus and Consistency
    • [ ] CQRS Distributed chaos, CAP Theorem

💾 How do I use it?

You need some of the following tools:

  • Docker
  • Visual Studio 2019
  • .Net Core 3.0

🎯 Clean Architecture

Here's the basic architecture of this microservice template:

  • Respecting policy rules, with dependencies always pointing inward
  • Separation of technology details from the rest of the system
  • SOLID
  • Single responsibility of each layer

cqrs-clean

✂️ CQRS

Segregation between Commands and Queries, with isolated databases and different models

⬇️ Command Stack

Has direct access to business rules and is responsible for only writes in the application.

Below you can find a basic interaction between components in the Command Stack:

⬆️ Query Stack

Responsible to provide data to consumers of your application, containing a simplified and more suitable model for reading, with calculated data, aggregated values and materialized structures.

The image contains the basic interaction between components in the Query Stack:

📚 DDD

This example contains a simplified Domain Model, with entities, aggregate roots, value objects and events, which are essential to synchronize the writing with reading database.

✔️ TDD

The project contains a well-defined IoC structure that allow you unit test almost every part of this service template, besides technology dependencies.

Inside the main layers you going to find Interfaces which are essential for the application, but with their implementations inside their own layers, what allow Mocking, Stubbing, using test doubles.

There's a simple example using Mother Object Pattern and Builder to simplify unit tests and keep it maintainable and clean.

📊 Data Intensive Microservice

This microservice template comes with SRP and SOC in mind. Given the own nature of CQRS, you can easily scale this application tuning each stack separately.

📄 Derived Data

Having multiple data stores makes this system a Derived Data system, which means, you never lose data, you can always rebuild one store from another, for example, if you lose an event which sync data between the write and read database you can always get this data back from the write database and rebuild the read store.

Domain Model is materialized to Query Models using view materializer. Keeping this as separed component in the query stack allows fully control to mapped properties and fully testable.

✉️ Message Broker

Given the physical isolation of data stores, Command Stack and Query Stack must communicate to synchronize data. This is done here using a Message Broker.

Every successful handled command creates an event, which is published into a Message Broker. A synchronization background process subscribes to those events and is responsible for updating the reading database.

🕑 Eventual Consistency

Everything comes with some kind of down side. The case of CQRS with multiple databases, to maintain high availability and scalability we create inconsistencies between databases.

More specifically, replicating data between two databases creates an eventual consistency, which in a specific moment in time, given the replication lag they are different, although is a temporary state and it eventually resolves itself.

📋 References

Here's a list of reliable information used to bring this project to life.

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