From the course: Designing Highly Scalable and Highly Available SQL Databases
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Distributing workload: Command Query Response Separation (CQSR)
From the course: Designing Highly Scalable and Highly Available SQL Databases
Distributing workload: Command Query Response Separation (CQSR)
- [Instructor] Another design pattern we sometimes use with scalable databases is called CQRS, which stands for Command Query Responsibility Separation. And here the idea is, okay, databases do two things, they accept commands, that cause us to manipulate data, update data, and we query it, we ask questions of the data, and we get answers back. Well, those are really two distinct things, updating the data and giving answers. So, what CQRS does is kind of takes advantage of those distinct natures of those two things and allows us to optimize both of them independently. And the way it does it does it, is because what's it's doing is it's basically separating reads from write operations. And this CQRS kind of works really well with Event Sourcing, you often see them together. And again, the key is that what you can do now is you can scale the read and writes separately, so if you have a very read-heavy model, you can scale up…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Human-scale and machine-scale data6m 13s
-
(Locked)
Different data ingestion strategies5m 6s
-
(Locked)
Designing scalable user interfaces6m 45s
-
(Locked)
Message queues to buffer ingested data4m 10s
-
(Locked)
Data modeling for scale: Event sourcing5m 17s
-
(Locked)
Distributing workload: Command Query Response Separation (CQSR)4m 26s
-
(Locked)
Challenge: Services and APIs for a scable user interface46s
-
(Locked)
Solution: Services and APIs for a scable user interface1m 10s
-
-
-