File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## Separate Command and Query processing at Application Server
2
+
3
+ ```
4
+ +---------------------+ +-------------+ +------------+
5
+ | | | | | |
6
+ | Client +--->+ Write API +--->+ |
7
+ | | | | | |
8
+ | Command { ... } | +-------------+ | |
9
+ | | | Database |
10
+ | | +-------------+ | |
11
+ | Query { ... } | | | | |
12
+ | +--->+ Read API +--->+ |
13
+ | | | | | |
14
+ +---------------------+ +-------------+ +------------+
15
+ ```
16
+
17
+ * Use patterns: Command, Query Object
18
+ * Separate Read and Write APIs
19
+ * Scale Database: use multiple replicas for read
20
+ * Use Event Sourcing (message bus) for DB sync
21
+
22
+
23
+ ## Scale Read API
24
+ ```
25
+ +---------------------+ +-------------+ +------------+
26
+ | | | | | |
27
+ | Client +--->+ Write API +--->+ Database +---+
28
+ | | | | | | |
29
+ | Command { ... } | +-------------+ +------------+ |
30
+ | | |
31
+ | | +-------------+ +------------+ |
32
+ | Query { ... } | | | | | |
33
+ | +--->+ Read API +--->+ Read DB +<--+
34
+ | | | | | | |
35
+ | | +-------------+ +------------+ |
36
+ | | |
37
+ | | +-------------+ +------------+ |
38
+ | | | | | | |
39
+ | +--->+ Read API +--->+ Read DB +<--+
40
+ | | | | | |
41
+ +---------------------+ +-------------+ +------------+
42
+ ```
You can’t perform that action at this time.
0 commit comments