This repository serves as a sample project to demonstrate various concurrency anomalies in applications and how to handle them effectively using different concurrency control mechanisms.
It accompanies the blog post Addressing Concurrency Anomalies in Applications, where these concepts are explored in depth.
In a minor scale, this also touches some concepts which can be clarified in this other blog post, DDD, CQRS and Distributed Systems in Python.
The project provides:
- Examples of dirty reads, non-repeatable reads, and lost updates in a transactional system.
- Implementations of pessimistic and optimistic concurrency control strategies.
- A Domain-Driven Design (DDD) approach to managing concurrency without depending on particular implementations.
Feel free to open issues or submit pull requests if you find improvements or want to extend the examples.