Skip to content

Instantly share code, notes, and snippets.

@zankard
Last active July 7, 2017 16:29
Show Gist options
  • Save zankard/9e3891a61ec7f3896082cb174555affb to your computer and use it in GitHub Desktop.
Save zankard/9e3891a61ec7f3896082cb174555affb to your computer and use it in GitHub Desktop.
@startdot
digraph g {
graph [bgcolor="transparent"];
rankdir=TB;
ranksep=0.1;
"application" [ shape=circle style = "filled" penwidth = 1 fillcolor = "white" label="app" ];
"cache" [ style="filled,rounded" shape=mrecord color="#9c27b0" fillcolor="#9c27b0" xlabel="Cache" label=<<table border="0" cellborder="1" cellpadding="10" bgcolor="white"><tr><td bgcolor="red" PORT="entry"></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr></table>> ];
"data_store" [ style="filled" shape=folder color="#64b5f6" fillcolor="#64b5f6" xlabel="Data Store" label=<<table border="0" cellborder="1" cellpadding="10" bgcolor="white"><tr><td bgcolor="red" PORT="entry"></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr></table>>];
application -> data_store [label="1"];
application -> cache:entry [ penwidth = 1 fontsize = 20 fontcolor = "black" label = "2" ];
}
@enddot
@startuml
database database [
\n\ndatabase\n\n\n
]
note bottom
从时间点 X 到 Y 数据变化了
end note
frame "Application Instance 1" {
control app1 [
app
]
storage storage1 [
| | | |<#FF8080> |
|<#FF8080> | | | |
| |<#FF8080> | | |
| | | | |
]
app1 <-down-> storage1
}
note left
X 时间点的快照
end note
frame "Application Instance 2" {
control app2 [
app
]
storage storage2 [
| | | | |
|<#64b5f6> | | |<#64b5f6> |
| | | | |
| | | |<#64b5f6> |
]
app2 <-down-> storage2
}
note left
Y 时间点的快照
end note
database -left-> app1:在 X 时间点获取数据
database -right-> app2:在 Y 时间点获取数据
@enduml
@startuml
database database [
\n\ndatabase\n\n\n
]
control app1
control app2
frame "Cache Service" {
storage storage1 [
| | | |<#FF8080> |
|<#FF8080> | | | |
| |<#FF8080> | | |
| | | | |
]
}
database -right-> storage1
app1 <-down-> storage1
app2 <-up-> storage1
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment