CQRS

Command Query Responsibility Segregation (CQRS) is an architectural pattern, proposed by Greg Young. CQRS suggests the segregation of the reading operations (queries) and writing operations (commands) of a system to separate subsystems, as reads are eventually consistent and retrieved from de-normalized views and commands are usually asynchronous and stored in transactional storage, and reads are eventually consistent and retrieved from deformalized views.

So, segregating read and write operations with separate interfaces or subsystems doesn't only help to maximize the performance of APIs, it also helps in security and scalability aspects, as well as managing merge conflicts at the domain level, due to update commands, leading to more ...

Get Hands-On RESTful API Design Patterns and Best Practices now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.