Skip to content

Commit

Permalink
docs: add more detailed video infrastructure diagram
Browse files Browse the repository at this point in the history
it shows better how the microservices are connected and which protocols are used to communicate
  • Loading branch information
lennartkloock committed May 8, 2023
1 parent 606f639 commit 925d6a6
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 0 deletions.
182 changes: 182 additions & 0 deletions design/assets/video-infrastructure-detailed.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
<mxfile host="app.diagrams.net" modified="2023-05-08T19:30:40.983Z" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0" etag="jeO7_9mYoeFO-1ta7gq9" version="21.2.3" type="device">
<diagram name="Page-1" id="XyPoJowb_y6indRsmkXw">
<mxGraphModel dx="1195" dy="638" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="WrXpl0bInO7aJhBuiIFK-35" value="Scuffle Video Infrastructure" style="rounded=0;whiteSpace=wrap;html=1;glass=0;fillColor=none;align=left;verticalAlign=top;fontSize=15;shadow=0;strokeColor=#000000;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;locked=1;connectable=0;" parent="1" vertex="1">
<mxGeometry x="105" y="90" width="945" height="500" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-5" value="rtmp" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="WrXpl0bInO7aJhBuiIFK-1" target="WrXpl0bInO7aJhBuiIFK-2" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="90" y="440" as="sourcePoint" />
</mxGeometry>
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-1" value="Streamer" style="rhombus;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="10" y="410" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-14" 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;" parent="1" source="WrXpl0bInO7aJhBuiIFK-2" target="WrXpl0bInO7aJhBuiIFK-13" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-28" value="gRPC" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="WrXpl0bInO7aJhBuiIFK-14" vertex="1" connectable="0">
<mxGeometry x="0.1757" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-18" 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;endArrow=none;endFill=0;" parent="1" source="WrXpl0bInO7aJhBuiIFK-2" target="WrXpl0bInO7aJhBuiIFK-17" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-39" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;endArrow=none;endFill=0;" parent="1" source="WrXpl0bInO7aJhBuiIFK-2" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="440" y="350" as="targetPoint" />
<Array as="points">
<mxPoint x="255" y="350" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-2" value="Ingest" style="triangle;whiteSpace=wrap;html=1;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;labelBackgroundColor=none;fillColor=#f8cecc;strokeColor=#b85450;" parent="1" vertex="1">
<mxGeometry x="225" y="410" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="xtq5lWVsjILsi1bRWJpn-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.374;exitY=1.02;exitDx=0;exitDy=0;dashed=1;endArrow=none;endFill=0;exitPerimeter=0;" parent="1" source="WrXpl0bInO7aJhBuiIFK-6" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="155" y="440" as="targetPoint" />
<Array as="points">
<mxPoint x="155" y="440" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-6" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;sends stream key and video data&lt;br style=&quot;font-size: 10px;&quot;&gt;&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="110" y="350" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-37" value="SQL" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="WrXpl0bInO7aJhBuiIFK-9" target="WrXpl0bInO7aJhBuiIFK-36" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="xtq5lWVsjILsi1bRWJpn-3" value="rmq" 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;" parent="1" source="WrXpl0bInO7aJhBuiIFK-9" target="WrXpl0bInO7aJhBuiIFK-19" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-9" value="API" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
<mxGeometry x="375" y="240" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-34" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.75;exitDx=0;exitDy=0;endArrow=none;endFill=0;dashed=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="WrXpl0bInO7aJhBuiIFK-11" target="WrXpl0bInO7aJhBuiIFK-9" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="360" y="270" as="targetPoint" />
<mxPoint x="330" y="225" as="sourcePoint" />
<Array as="points">
<mxPoint x="320" y="270" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-11" value="checks stream key and user permissions, creates stream" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="244" y="231" width="120" height="50" as="geometry" />
</mxCell>
<mxCell id="r0uAJpNcuiGpBw157YY_-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.25;entryY=1;entryDx=0;entryDy=0;" parent="1" source="WrXpl0bInO7aJhBuiIFK-13" target="r0uAJpNcuiGpBw157YY_-1" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="790" y="450" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-13" value="&lt;div&gt;Transcoding&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1">
<mxGeometry x="565.03" y="420" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;dashed=1;endArrow=none;endFill=0;" parent="1" source="WrXpl0bInO7aJhBuiIFK-15" target="WrXpl0bInO7aJhBuiIFK-13" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-15" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;uses ffmpeg to transcode stream into different resolutions&lt;br style=&quot;font-size: 10px;&quot;&gt;&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="565.03" y="510" width="120" height="50" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-17" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;transmuxes stream into mp4&lt;br style=&quot;font-size: 10px;&quot;&gt;&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="195" y="515" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-24" value="rmq" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" source="WrXpl0bInO7aJhBuiIFK-13" target="WrXpl0bInO7aJhBuiIFK-19" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="625.03" y="350" as="sourcePoint" />
<mxPoint x="665.03" y="360" as="targetPoint" />
<Array as="points" />
</mxGeometry>
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-19" value="RMQ server" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
<mxGeometry x="565.03" y="240" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-21" value="rmq" style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;rounded=0;entryX=0.25;entryY=1;entryDx=0;entryDy=0;" parent="1" target="WrXpl0bInO7aJhBuiIFK-19" edge="1">
<mxGeometry width="80" relative="1" as="geometry">
<mxPoint x="435" y="350" as="sourcePoint" />
<mxPoint x="515" y="350" as="targetPoint" />
<Array as="points">
<mxPoint x="595" y="350" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;dashed=1;endArrow=none;endFill=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="WrXpl0bInO7aJhBuiIFK-23" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="540" y="360" as="targetPoint" />
<mxPoint x="530" y="380" as="sourcePoint" />
<Array as="points">
<mxPoint x="540" y="380" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-23" value="- requests a transcoder&lt;br&gt;- picks up stop stream requests" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="400" y="360" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="r0uAJpNcuiGpBw157YY_-4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;endArrow=none;endFill=0;dashed=1;" parent="1" source="WrXpl0bInO7aJhBuiIFK-25" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="639" y="360.9333333333333" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-25" value="transcoder picks up request" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="649" y="341" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-29" value="Edge" style="shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
<mxGeometry x="860" y="410" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-32" value="HTTP" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="WrXpl0bInO7aJhBuiIFK-31" target="WrXpl0bInO7aJhBuiIFK-29" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-31" value="Website" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="1080" y="410" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-36" value="Database" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
<mxGeometry x="375" y="110" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="WrXpl0bInO7aJhBuiIFK-43" value="gRPC" style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" target="WrXpl0bInO7aJhBuiIFK-9" edge="1">
<mxGeometry width="80" relative="1" as="geometry">
<mxPoint x="435" y="350" as="sourcePoint" />
<mxPoint x="520" y="310" as="targetPoint" />
<Array as="points" />
</mxGeometry>
</mxCell>
<mxCell id="xtq5lWVsjILsi1bRWJpn-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.75;exitDx=0;exitDy=0;endArrow=none;endFill=0;dashed=1;" parent="1" source="xtq5lWVsjILsi1bRWJpn-1" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="416" y="326" as="targetPoint" />
<mxPoint x="256" y="246" as="sourcePoint" />
<Array as="points">
<mxPoint x="364" y="326" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="xtq5lWVsjILsi1bRWJpn-1" value="sends go live request" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="244" y="295" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="xtq5lWVsjILsi1bRWJpn-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;dashed=1;endArrow=none;endFill=0;" parent="1" source="xtq5lWVsjILsi1bRWJpn-5" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="532.3571428571429" y="260" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="xtq5lWVsjILsi1bRWJpn-5" value="can send stop stream request" style="rounded=1;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="472.5" y="170" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="r0uAJpNcuiGpBw157YY_-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="r0uAJpNcuiGpBw157YY_-1" target="WrXpl0bInO7aJhBuiIFK-29" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="850" y="450" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="r0uAJpNcuiGpBw157YY_-1" value="Redis" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
<mxGeometry x="760" y="240" width="120" height="60" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Binary file added design/assets/video-infrastructure-detailed.webp
Binary file not shown.
4 changes: 4 additions & 0 deletions design/video-infrastructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ Edge is a rather complex system designed to do these functions efficiently, reli

The website will have a video player which will be able to playback the stream in the requested quality.

## Detailed diagram

![](./assets/video-infrastructure-detailed.webp)

## Useful links

### Transport Protocols
Expand Down

0 comments on commit 925d6a6

Please sign in to comment.