In distributed CQRS architectures, a common frustration is issuing a command that returns success, only to find the read model hasn't caught up. Developers often resort to arbitrary sleep calls, which are fragile and inefficient. This article explores the SENT, PROCESSED, and PROJECTED completion semantics that define when a command is truly 'done'. It then introduces Wow, a framework that lets developers declare their consistency requirements instead of hardcoding delays. By using a declarative waiting plan, the system can intelligently wait for the right projection state, reducing latency and eliminating guesswork. This approach is particularly relevant for teams building event-sourced systems or microservices with complex read models. The article provides a practical lens on a problem many engineers face, offering a more principled solution than the typical sleep-and-pray pattern.
A deep dive into CQRS consistency semantics and how declarative wait plans replace fragile fixed delays.