-
Notifications
You must be signed in to change notification settings - Fork 0
/
arch.drawio
165 lines (165 loc) · 14.3 KB
/
arch.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<mxfile>
<diagram id="npV76rbQIyxqmrXlsT3M" name="Page-1">
<mxGraphModel dx="1120" dy="771" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="166" value="" style="group" vertex="1" connectable="0" parent="1">
<mxGeometry x="25" y="20" width="655" height="535" as="geometry"/>
</mxCell>
<mxCell id="128" value="" style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="166" vertex="1">
<mxGeometry x="235" y="40" width="160" height="220" as="geometry"/>
</mxCell>
<mxCell id="103" value="MongoDB" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#60a917;strokeColor=#2D7600;fontColor=#ffffff;" parent="166" vertex="1">
<mxGeometry x="455" y="40" width="60" height="80" as="geometry"/>
</mxCell>
<mxCell id="104" value="Redis" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#a20025;strokeColor=#6F0000;fontColor=#ffffff;" parent="166" vertex="1">
<mxGeometry x="285" y="367.5" width="60" height="80" as="geometry"/>
</mxCell>
<mxCell id="105" value="Client" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1ba1e2;strokeColor=#006EAF;fontColor=#ffffff;" parent="166" vertex="1">
<mxGeometry x="35" y="70" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="146" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.75;entryDx=0;entryDy=0;" parent="166" source="110" target="105" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="215" y="115"/>
<mxPoint x="215" y="115"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="110" value="Flask" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;" parent="166" vertex="1">
<mxGeometry x="255" y="70" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="134" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="166" source="105" target="110" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="235" y="100" as="targetPoint"/>
<Array as="points"/>
</mxGeometry>
</mxCell>
<mxCell id="148" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" parent="166" source="105" target="110" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="95" y="20"/>
<mxPoint x="315" y="20"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="141" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=0;exitDx=0;exitDy=0;entryX=0.25;entryY=1;entryDx=0;entryDy=0;" parent="166" source="124" target="110" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="144" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" parent="166" source="124" target="104" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="124" value="Celery Client" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fa6800;strokeColor=#C73500;fontColor=#ffffff;" parent="166" vertex="1">
<mxGeometry x="255" y="180" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="140" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;" parent="166" source="110" target="124" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="135" value="1" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="166" vertex="1">
<mxGeometry x="175" y="80" width="40" height="20" as="geometry"/>
</mxCell>
<mxCell id="139" value="2" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="166" vertex="1">
<mxGeometry x="405" y="130" width="40" height="20" as="geometry"/>
</mxCell>
<mxCell id="143" value="5" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="166" vertex="1">
<mxGeometry x="245" y="140" width="40" height="20" as="geometry"/>
</mxCell>
<mxCell id="145" value="4" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="166" vertex="1">
<mxGeometry x="315" y="290" width="40" height="20" as="geometry"/>
</mxCell>
<mxCell id="147" value="6" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="166" vertex="1">
<mxGeometry x="175" y="120" width="40" height="20" as="geometry"/>
</mxCell>
<mxCell id="149" value="7" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="166" vertex="1">
<mxGeometry x="175" width="40" height="20" as="geometry"/>
</mxCell>
<mxCell id="150" value="" style="group" parent="166" vertex="1" connectable="0">
<mxGeometry x="415" y="280" width="160" height="255" as="geometry"/>
</mxCell>
<mxCell id="129" value="" style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="150" vertex="1">
<mxGeometry width="160" height="255" as="geometry"/>
</mxCell>
<mxCell id="106" value="Celery Workers" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;strokeColor=#432D57;fontColor=#ffffff;" parent="150" vertex="1">
<mxGeometry x="20.720000000000027" y="20" width="118.57" height="55" as="geometry"/>
</mxCell>
<mxCell id="125" value="Celery Workers" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;strokeColor=#432D57;fontColor=#ffffff;" parent="150" vertex="1">
<mxGeometry x="20.720000000000027" y="180" width="118.57" height="55" as="geometry"/>
</mxCell>
<mxCell id="126" value="Celery Workers" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#76608a;strokeColor=#432D57;fontColor=#ffffff;" parent="150" vertex="1">
<mxGeometry x="20.730000000000018" y="100" width="118.57" height="55" as="geometry"/>
</mxCell>
<mxCell id="151" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0;exitDx=0;exitDy=27.5;exitPerimeter=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;" parent="166" source="104" target="129" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="375" y="395"/>
<mxPoint x="375" y="344"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="153" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0;exitDx=0;exitDy=52.5;exitPerimeter=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0;" parent="166" source="104" target="129" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="375" y="420"/>
<mxPoint x="375" y="471"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="154" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=1;entryDx=0;entryDy=-15;entryPerimeter=0;" parent="166" source="106" target="103" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="595" y="327"/>
<mxPoint x="595" y="105"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="155" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" parent="166" source="126" target="103" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="625" y="407"/>
<mxPoint x="625" y="80"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="156" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0;entryDx=0;entryDy=15;entryPerimeter=0;" parent="166" source="125" target="103" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="655" y="487"/>
<mxPoint x="655" y="55"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="158" value="Async" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="166">
<mxGeometry x="605" y="220" width="40" height="40" as="geometry"/>
</mxCell>
<mxCell id="157" value="Async" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="166">
<mxGeometry x="345" y="387.5" width="40" height="40" as="geometry"/>
</mxCell>
<mxCell id="152" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="166" source="157" target="129" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="159" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="166" source="104" target="157">
<mxGeometry relative="1" as="geometry">
<mxPoint x="345" y="407.5" as="sourcePoint"/>
<mxPoint x="415" y="407.5" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="161" value="<h1><span>Flow</span></h1><div><span>1. Send webm audio file to server</span></div><div>2. Upload file to storage bucket</div><div>3. Send task to celery client</div><div>4. Celery client queues task in redis</div><div>5. Celery client sends task id to flask server</div><div>6. Send task id and poll url to client</div><div>7. Poll the recieved url till task is completed</div>" style="text;html=1;strokeColor=#001DBC;fillColor=#0050ef;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;fontColor=#ffffff;" vertex="1" parent="166">
<mxGeometry y="160" width="190" height="210" as="geometry"/>
</mxCell>
<mxCell id="162" value="Google storage bucket" style="shape=datastore;whiteSpace=wrap;html=1;" vertex="1" parent="166">
<mxGeometry x="445" y="180" width="100" height="60" as="geometry"/>
</mxCell>
<mxCell id="164" value="3" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="166">
<mxGeometry x="345" y="140" width="40" height="20" as="geometry"/>
</mxCell>
<mxCell id="165" value="<h1><span>Async</span></h1><div><span>1. Pick up task from redis queue</span></div><div>2. Process task<br>&nbsp; &nbsp; &nbsp; + Download file from GCS</div><div>&nbsp; &nbsp; &nbsp; + Convert webm to wav</div><div>&nbsp; &nbsp; &nbsp; + Get transcript for audio</div><div>&nbsp; &nbsp; &nbsp; + Process audio for stats</div><div>&nbsp; &nbsp; &nbsp; + Save stats to DB</div><div><br></div>" style="text;html=1;strokeColor=#001DBC;fillColor=#0050ef;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;fontColor=#ffffff;" vertex="1" parent="166">
<mxGeometry y="370" width="190" height="150" as="geometry"/>
</mxCell>
<mxCell id="163" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="166" source="110" target="162">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>