-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp_context.wsd
80 lines (61 loc) · 1.38 KB
/
app_context.wsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@startuml
skinparam componentStyle uml2
' skinparam component {
' backgroundColor<<Bounded Context>> Yellow
' }
title Application Contexts with Redux
' show view + filter panel example?
node "Model" {
component SagaQueue <<Saga>> [
Action Queue
- triggers state update
- creates state event
]
component SagaBG <<Saga>> [
Optional Features
a. Background Action
- creates task event
- can cancel task
- creates action event
- for long running actions
b. Coordinator
- coordinates between models
- eg. unrelated components
]
component StateUpdate <<Bounded Context>> [
<b>State Update</b>
- processes action
- mutates model state
]
database "Local Storage" as DB
cloud API
component Action [
Action Creator
- creates action event
- notifies action was processed or cancelled
]
}
node UI {
component User
component Component <<Observer>> [
Component
- renders model(s)
- passes data from DOM to model
]
component Reducer <<Bounded Context>> [
<b>Reducer</b>
]
database "Action Log" <<Event Log>> as EventLog
}
User ..> Component : Command
Component .> Action
Component ..> Reducer
Action <.. SagaQueue
SagaBG .up.> Action
SagaBG .left.> SagaQueue
SagaQueue .down.> StateUpdate : Command
StateUpdate ..> DB
StateUpdate .> API
Reducer .right.> SagaQueue
Reducer ..> EventLog
@enduml