-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdesign_diagram.drawio
78 lines (78 loc) · 15.1 KB
/
design_diagram.drawio
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
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" version="24.8.3">
<diagram name="Page-1" id="c4acf3e9-155e-7222-9cf6-157b1a14988f">
<mxGraphModel dx="1050" dy="1657" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="none" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="5d2195bd80daf111-10" value="<p style="margin:0px;margin-top:4px;text-align:center;"><b>Site</b></p><hr size="1"><p style="margin:0px;margin-left:4px;">+ <b>side_id</b>: Integer</p><p style="margin:0px;margin-left:4px;">+ <b>site_data</b>:&nbsp;<span style="background-color: initial;">Dict[data_id, last_committed_value]</span></p><p style="margin:0px;margin-left:4px;"><br></p>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;rounded=0;shadow=0;comic=0;labelBackgroundColor=none;strokeWidth=1" parent="1" vertex="1">
<mxGeometry x="60" y="730" width="270" height="70" as="geometry" />
</mxCell>
<mxCell id="EIfYpKHlNEmlDHZDdE43-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="5d2195bd80daf111-18" target="5d2195bd80daf111-19" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="EIfYpKHlNEmlDHZDdE43-37" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;dashed=1;" parent="1" source="5d2195bd80daf111-18" target="EIfYpKHlNEmlDHZDdE43-35" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="5d2195bd80daf111-18" value="<p style="margin:0px;margin-top:4px;text-align:center;"><b>Driver</b></p><hr size="1"><p style="margin:0px;margin-left:4px;">+ <b>instructions</b>: List[Instruction]</p><hr size="1"><p style="margin:0px;margin-left:4px;">+ <b>process</b>(self)<br>+ <b>parse_file</b>(self, file: String)</p><p style="margin:0px;margin-left:4px;">+ <b>__init__</b>(self)</p><p style="margin:0px;margin-left:4px;"><br></p>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;rounded=0;shadow=0;comic=0;labelBackgroundColor=none;strokeWidth=1" parent="1" vertex="1">
<mxGeometry x="100" y="-20" width="190" height="140" as="geometry" />
</mxCell>
<mxCell id="EIfYpKHlNEmlDHZDdE43-41" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;dashed=1;" parent="1" source="5d2195bd80daf111-19" target="EIfYpKHlNEmlDHZDdE43-38" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="250" y="310" />
<mxPoint x="720" y="310" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="EIfYpKHlNEmlDHZDdE43-47" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.75;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;dashed=1;" parent="1" source="5d2195bd80daf111-19" target="EIfYpKHlNEmlDHZDdE43-46" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ZkX1OmZ0OC17ezpgjjzT-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="5d2195bd80daf111-19" target="5d2195bd80daf111-20" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="liZSuBq_oHjOSZf-k_FQ-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;dashed=1;" parent="1" source="5d2195bd80daf111-19" target="EIfYpKHlNEmlDHZDdE43-42" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="5d2195bd80daf111-19" value="<p style="margin:0px;margin-top:4px;text-align:center;"><b>TransactionManager</b></p><hr size="1"><p style="margin:0px;margin-left:4px;">+ <b>data_broker</b>: DataBroker<br>+ <b>site_broker</b>: SiteBroker</p><p style="margin:0px;margin-left:4px;">+ <b>transaction_map</b><span style="background-color: initial;">: Dict[</span><span style="background-color: initial;">t_id, Transaction]</span></p><p style="margin:0px;margin-left:4px;"><span style="background-color: initial;">+ <b>conflict_graph</b>: Dict[t_id, List[t_id]]&nbsp; <span style="white-space: pre;">	</span>// Adjacency List</span></p><p style="margin:0px;margin-left:4px;"><span style="background-color: initial;">+ <b>site_managers</b>: Dict[site_id, SiteManager]</span></p><hr size="1"><p style="margin:0px;margin-left:4px;">+ <b>__init__</b>(self)</p><p style="margin:0px;margin-left:4px;">+ <b>begin</b>(self, t_id)<br>+ <b>read</b>(self, t_id, data_id)</p><p style="margin:0px;margin-left:4px;">+ <b>write</b>(self, t_id, data_id, value)</p><p style="margin:0px;margin-left:4px;">+ <b>dump</b>(self)</p><p style="margin:0px;margin-left:4px;">+ <b>end</b>(self, t_id)</p><p style="margin:0px;margin-left:4px;">+ <b>fail</b>(self, site_id)</p><p style="margin:0px;margin-left:4px;">+ <b>recover</b>(self, site_id)</p><p style="margin:0px;margin-left:4px;">+ <b>queryState</b>(self)</p><p style="margin:0px;margin-left:4px;"><br></p>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;rounded=0;shadow=0;comic=0;labelBackgroundColor=none;strokeWidth=1" parent="1" vertex="1">
<mxGeometry x="40" y="170" width="310" height="260" as="geometry" />
</mxCell>
<mxCell id="ZkX1OmZ0OC17ezpgjjzT-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="5d2195bd80daf111-20" target="5d2195bd80daf111-10" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="liZSuBq_oHjOSZf-k_FQ-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;dashed=1;" parent="1" source="5d2195bd80daf111-20" target="ZkX1OmZ0OC17ezpgjjzT-6" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="5d2195bd80daf111-20" value="<p style="margin:0px;margin-top:4px;text-align:center;"><b>Site Manager</b></p><hr size="1"><p style="margin:0px;margin-left:4px;">+ <b>site</b>: Site</p><p style="margin:0px;margin-left:4px;">+ <b>data_history</b>: Dict[data_id, DataLog]</p><hr size="1"><p style="margin: 0px 0px 0px 4px;">+ <b>__init__</b>(self)</p><p style="margin: 0px 0px 0px 4px;">+ <b>read</b>(self, t_id, data_id)</p><p style="margin: 0px 0px 0px 4px;">+ <b>write</b>(self, t_id, data_id, value)</p><p style="margin: 0px 0px 0px 4px;">+ <b>dump</b>(self)</p><p style="margin: 0px 0px 0px 4px;"><span style="background-color: initial;">+ <b>fail</b>(self, site_id)</span></p><p style="margin: 0px 0px 0px 4px;">+ <b>recover</b>(self, site_id)</p><p style="margin: 0px 0px 0px 4px;">+ <b>query_state</b>(self)</p><p style="margin: 0px 0px 0px 4px;">+ <b>persist(</b>self, t_id)</p>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;rounded=0;shadow=0;comic=0;labelBackgroundColor=none;strokeWidth=1" parent="1" vertex="1">
<mxGeometry x="72.5" y="500" width="245" height="190" as="geometry" />
</mxCell>
<mxCell id="EIfYpKHlNEmlDHZDdE43-35" value="<p style="margin:0px;margin-top:4px;text-align:center;"><b>Instruction</b></p><hr size="1" style="border-style:solid;"><p style="margin:0px;margin-left:4px;">+ <b>operation</b>: String</p><p style="margin:0px;margin-left:4px;">+ <b>t_id</b>: Integer</p><p style="margin:0px;margin-left:4px;">+ <b>data_id</b>: Integer</p><p style="margin:0px;margin-left:4px;">+ <b>value</b>: Integer</p><p style="margin:0px;margin-left:4px;">+ <b>site_id</b>: Integer</p><p style="margin:0px;margin-left:4px;">+ <b>time</b>: Integer</p><p style="margin:0px;margin-left:4px;"><br></p>" style="verticalAlign=top;align=left;overflow=fill;html=1;whiteSpace=wrap;" parent="1" vertex="1">
<mxGeometry x="480" y="-16" width="170" height="132" as="geometry" />
</mxCell>
<mxCell id="liZSuBq_oHjOSZf-k_FQ-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;dashed=1;" parent="1" source="EIfYpKHlNEmlDHZDdE43-38" target="liZSuBq_oHjOSZf-k_FQ-4" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="EIfYpKHlNEmlDHZDdE43-38" value="<p style="margin:0px;margin-top:4px;text-align:center;"><b>Transaction</b></p><hr size="1" style="border-style:solid;"><p style="margin:0px;margin-left:4px;">+ <b>t_id</b>: Integer</p><p style="margin:0px;margin-left:4px;">+ <b>status</b>: TransactionStatus</p><p style="margin:0px;margin-left:4px;">+ <b>start_time</b>: Integer</p><p style="margin:0px;margin-left:4px;">+ <b>commit_time</b>: Integer</p><p style="margin:0px;margin-left:4px;">+ <b>sites_accessed</b>: list[site_id]</p>" style="verticalAlign=top;align=left;overflow=fill;html=1;whiteSpace=wrap;" parent="1" vertex="1">
<mxGeometry x="640" y="380" width="190" height="130" as="geometry" />
</mxCell>
<mxCell id="EIfYpKHlNEmlDHZDdE43-42" value="<p style="margin:0px;margin-top:4px;text-align:center;"><b>DataBroker</b></p><hr size="1" style="border-style:solid;"><p style="margin:0px;margin-left:4px;">+ <b>data_map</b>: Dict[data_id, List[site_id]]</p>" style="verticalAlign=top;align=left;overflow=fill;html=1;whiteSpace=wrap;" parent="1" vertex="1">
<mxGeometry x="450" y="190" width="250" height="90" as="geometry" />
</mxCell>
<mxCell id="ZkX1OmZ0OC17ezpgjjzT-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;dashed=1;" parent="1" source="EIfYpKHlNEmlDHZDdE43-46" target="ZkX1OmZ0OC17ezpgjjzT-3" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="EIfYpKHlNEmlDHZDdE43-46" value="<p style="margin:0px;margin-top:4px;text-align:center;"><b>SiteBroker</b></p><hr size="1" style="border-style:solid;"><p style="margin:0px;margin-left:4px;">+ <b>site_map</b>: Dict[site_id, SiteStatus]</p>" style="verticalAlign=top;align=left;overflow=fill;html=1;whiteSpace=wrap;" parent="1" vertex="1">
<mxGeometry x="390" y="390" width="230" height="80" as="geometry" />
</mxCell>
<mxCell id="ZkX1OmZ0OC17ezpgjjzT-3" value="<p style="margin:0px;margin-top:4px;text-align:center;"><b>SiteStatus</b></p><hr size="1" style="border-style:solid;"><p style="margin:0px;margin-left:4px;"><span style="background-color: initial;">+ <b>status</b>: Boolean</span></p><p style="margin:0px;margin-left:4px;"><span style="background-color: initial;">+ <b>site_log</b>: List[Tuple(time, status)]</span></p>" style="verticalAlign=top;align=left;overflow=fill;html=1;whiteSpace=wrap;" parent="1" vertex="1">
<mxGeometry x="401.25" y="540" width="207.5" height="90" as="geometry" />
</mxCell>
<mxCell id="ZkX1OmZ0OC17ezpgjjzT-6" value="<p style="margin:0px;margin-top:4px;text-align:center;"><b>DataLog</b></p><hr size="1" style="border-style:solid;"><p style="margin:0px;margin-left:4px;"><span style="background-color: initial;">+ <b>log</b>: List[Tuple(time, value, t_id))]</span></p>" style="verticalAlign=top;align=left;overflow=fill;html=1;whiteSpace=wrap;" parent="1" vertex="1">
<mxGeometry x="400" y="710" width="210" height="90" as="geometry" />
</mxCell>
<mxCell id="liZSuBq_oHjOSZf-k_FQ-4" value="<p style="margin:0px;margin-top:4px;text-align:center;"><b>TransactionStatus [Enum]</b></p><hr size="1" style="border-style:solid;"><p style="margin:0px;margin-left:4px;">+ <b>READY</b></p><p style="margin:0px;margin-left:4px;">+ <b>RUNNING</b></p><p style="margin:0px;margin-left:4px;">+ <b>WAITING</b></p><p style="margin:0px;margin-left:4px;">+ <b>ABORTED</b></p><p style="margin:0px;margin-left:4px;">+ <b>COMMITTED</b></p>" style="verticalAlign=top;align=left;overflow=fill;html=1;whiteSpace=wrap;" parent="1" vertex="1">
<mxGeometry x="640" y="570" width="190" height="120" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>