-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdesign.puml
79 lines (66 loc) · 1.69 KB
/
design.puml
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
@startuml
'方案1
client -> logicServ: begin,
logicServ -> logicServ:begin_ts = getTs()
'logicServ -> storageServ:
logicServ -->client:
client->logicServ:get(key)
logicServ->storageServ:begin(begin_ts); get(key, begin_ts)
storageServ --> logicServ:
logicServ --> client:
client -> logicServ: update(key, value)
logicServ -> storageServ:update(key, value, begin_ts)
storageServ --> logicServ:
client <-- logicServ:
client -> logicServ: commit()
logicServ -> logicServ:start_ts = getTs()
logicServ -> storageServ:所有参与者prepare(start_ts, transList)
storageServ-->logicServ:
logicServ-->client:返回commit成功
logicServ -> logicServ:commit_ts = getTs() [可选]
logicServ->storageServ:id0参与者commit(commit_ts) [可选]
storageServ-->logicServ:
@enduml
@startuml
'(*)--> if "Some Test" then
'
' -->[true] "activity 13"
'
'(*) --> if "Some Test" then
'
' -->[true] "activity 1"
'
' if "" then
' -> "activity 3" as a3
' else
' if "Other test" then
' -left-> "activity 5"
' else
' --> "activity 6"
' endif
' endif
'
'else
'
' ->[false] "activity 2"
'
'endif
'
'a3 --> if "last test" then
' --> "activity 7"
'else
' -> "activity 8"
'endif
'a3 --> if "last test1" then
' --> "activity 9"
'else
' -> "activity 10"
'endif
(*) --> "a"
"TransationList"-->Trans1={stat:commited, version:commit_ts1}
"TransationList(no commited)"-->Trans2={stat:no prepare, version:null}
"TransationList(no commited)"-->Trans3={stat:no prepare, version:null}
DataList --> data_key1_entry={value:x, next:Trans1, version:Trans1}
DataList --> data_key2_entry={value:y, next:null, version:Trans1}
"data_key1_entry={value:x, next:Trans1, version:Trans1}"-->data_key1_Trans1={value:x, next:null, version:Trans1}
@enduml