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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.