Skip to Content
Hands-On Reactive Programming in Spring 5
book

Hands-On Reactive Programming in Spring 5

by Oleh Dokuka, Igor Lozynskyi
October 2018
Intermediate to advanced
556 pages
15h 18m
English
Packt Publishing
Content preview from Hands-On Reactive Programming in Spring 5

Command Query Responsibility Segregation

Command Query Responsibility Segregation (CQRS) is often used alongside event sourcing. CQRS consists of two parts:

  • The writing part receives state-update commands and stores them in an underlying event store, but does not return an entity state.
  • The reading part does not change the state and returns it for a requested query type. State representations for distinct queries are stored in views, which are recalculated asynchronously after update events are received as commands.

The way in which the CQRS pattern works is as follows:

Diagram 7.10 A CQRS implementation for the Order service. The write ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Spring Microservices in Action, Second Edition

Spring Microservices in Action, Second Edition

John Carnell, Illary Huaylupo Sanchez

Publisher Resources

ISBN: 9781787284951Supplemental Content