Command-Query Responsibility Segregation (CQRS)
The origin of CQRS can be traced back to another design pattern called Command Query Separation (CQS). CQS is the core concept that defines two types of operations handled in a system: a command that executes a task, and a query that returns information, and there should never be one function that does both jobs.
The term CQS was created by Bertrand Meyer in his book Object-Oriented Software Construction in 1988. He created it as part of his work on the Eiffel programming language.
CQRS takes the defining principle of CQS and extends it to specific objects within a system, one retrieving data and one modifying data. CQRS is a broader architectural pattern, and CQS is the general principle of behavior.
The term CQRS was coined by Greg Young in 2010. Since then, CQRS has gained traction, and various frameworks and libraries have been developed to support the pattern’s implementation in popular languages such as Java and...