Jump to content

Command Query Responsibility Segregation

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 179.191.106.218 (talk) at 16:38, 9 October 2024 (Added historical references). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In information technology, Command Query Responsibility Segregation (CQRS) is a system architecture that extends the idea behind command–query separation (CQS) to the level of services.[1][2] Such a system will have separate interfaces to send queries and to send commands. As in CQS, fulfilling a query request will only retrieve data and will not modify the state of the system (with some exceptions like logging access), while fulfilling a command request will modify the state of the system.

Many systems push the segregation to the data models used by the system. The models used to process queries are usually called read models and the models used to process commands write models.

Although its origin is usually attributed to Greg Young in 2010 [3], everything indicates that the precursor of CQRS was Udi Dahan who in August 2008 published on his blog a training course that aimed to apply CQRS together with SOA [3] and more in depth in December 2009 [3].

References

  1. ^ Young, Greg. "CQRS Documents" (PDF). Retrieved 2012-12-28.
  2. ^ Fowler, Martin. "CQRS". Retrieved 2011-07-14.
  3. ^ a b c Young, Greg. "CQRS Documents" (PDF). Retrieved 2024-10-09. Cite error: The named reference "Training" was defined multiple times with different content (see the help page).