Command-Query-Responsibility-Segregation

from Wikipedia, the free encyclopedia

Functional principle of CQRS with event sourcing

The Command-Query-Responsibility-Segregation ( CQRS , [ kə'mæ: nd 'kwɪ (ə) ri: ri, spɑnsə'bɪləti, sɛgrɪ'geiʃ ( [ ) n ] or [ si: kju: ɑ: r s ] , English for about command-query-responsibility separation ) is a variant of the CQS principle on database queries, which was defined by Greg Young .

advantages

disadvantage

  • High effort in software development. More suitable for projects with many simultaneous users.
  • Requires the right infrastructure.
  • Transactions are difficult to implement.
  • Queries can be carried out before commands have been carried out. Versioning and an in-memory cache are therefore required to ensure that the client receives data in the correct version.

Trivia

The abbreviation CQRS is by software developers because of Google - AutoCorrect jokingly as cars [ kɑrz spoken].

Frameworks

.NET
JVM
JavaScript
  • wolkenkit. Retrieved June 27, 2017 (English, CQRS, DDD and event sourcing framework for JavaScript).
PHP
  • prooph. Accessed February 1, 2018 (English, CQRS and Event Sourcing Infrastructure for PHP).

literature

  • Chris Richardson: Microservices Patterns . Manning, Shelter Island NY 2019, ISBN 978-1-61729-454-9 , pp. 228-252 (American English).

Web links

swell

  1. Martin Fowler: CQRS. July 14, 2011, accessed May 18, 2014 .
  2. ^ Greg Young: CQRS Documents by Greg Young. (PDF) In: WordPress. November 2010, accessed July 13, 2014 .