Command Query Responsibility Segregation
   HOME

TheInfoList



OR:

In
information technology Information technology (IT) is the use of computers to create, process, store, retrieve, and exchange all kinds of data . and information. IT forms part of information and communications technology (ICT). An information technology system (I ...
, Command Query Responsibility Segregation (CQRS) is a
system architecture A system architecture is the conceptual model that defines the structure, behavior, and more views of a system. An architecture description is a formal description and representation of a system, organized in a way that supports reasoning about the ...
that extends the idea behind
command–query separation Command-query separation (CQS) is a principle of imperative computer programming. It was devised by Bertrand Meyer as part of his pioneering work on the Eiffel programming language. It states that every method should either be a ''command'' tha ...
to the level of services. 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''.


References

{{reflist


External links


CQRS Journey by Microsoft patterns & practicesDDD/CQRS/Event Sourcing List

The CQRS Frequently Asked Questions
Systems architecture Software architecture