Skip to content

Commit e9e51f7

Browse files
committed
Add diagrams
1 parent db65f62 commit e9e51f7

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

JavaScript/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
```

0 commit comments

Comments
 (0)