Command-Query-Responsibility-Segregation
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
- High scalability
- Suitable for use in service-oriented architectures , for example in cloud computing
- Write and read access can be scaled independently of one another
- Improved security thanks to separate roles for read and write operations
-
Simultaneous use of different versions of the same software is possible
- Maintaining backward compatibility possible
- Migration to the new version in live operation possible without downtime
- Adaptability to changed business requirements
- Development of the individual components by different teams
- Can be combined with event sourcing
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
- Tyrone Groves: SimpleCQRS. In: GitHub. Retrieved July 21, 2014 .
- The Ncqrs Framework. In: GitHub. Retrieved on July 13, 2014 (English, CQRS framework for the .NET framework ).
- JVM
- AxonIQ. Retrieved March 10, 2020 (English, CQRS framework for the Java runtime environment ).
- 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
- CQRS Journey. In: patterns & practices, MSDN. Microsoft, July 2012, accessed on July 13, 2014 (English, Tutorial on CQRS and Event Sourcing in C # ).
- Kanasz Robert: Introduction to CQRS. In: CodeProject. March 21, 2013, accessed July 13, 2014 (English, Introduction to CQRS in C # ).
- Greg Young: CQRS / DDD by Greg Young. In: YouTube. Rinat Abdullin, January 20, 2012, accessed on July 13, 2014 (English, Introduction to CQRS and DDD ).
- Lev Gorodinski: Domain-Driven Design, Event Sourcing and CQRS with F # and EventStore. In: YouTube. DC F # Meetup, March 6, 2014, accessed July 13, 2014 (English, CQRS and EventSourcing in F # ).
- Golo Roden, Matthias Wagler, Susanna Roden: wolkenkit - The semantic JavaScript backend for event-driven development . Accessed July 9, 2017 (PDF, English, introduction to CQRS, DDD and event sourcing)
swell
- ↑ Martin Fowler: CQRS. July 14, 2011, accessed May 18, 2014 .
- ^ Greg Young: CQRS Documents by Greg Young. (PDF) In: WordPress. November 2010, accessed July 13, 2014 .