Skip to content

Welcome to Django CQRS's documentation!

django-cqrs is an Django application, that implements CQRS data synchronisation between several Django microservices.


In CloudBlue Connect we have a rather complex Domain Model. There are many microservices, that are decomposed by subdomain and which follow database-per-service pattern. These microservices have rich and consistent APIs. They are deployed in cloud k8s cluster and scale automatically under load. Many of these services aggregate data from other ones and usually API Composition is totally enough. But, some services are working too slowly with API JOINS, so another pattern needs to be applied.

The pattern, that solves this issue is called CQRS - Command Query Responsibility Segregation. Core idea behind this pattern is that view databases (replicas) are defined for efficient querying and DB joins. Applications keep their replicas up to date by subscribing to Domain events published by the service that owns the data. Data is eventually consistent and that's okay for non-critical business transactions.