Files
lambda_local_runner/docs/graphs/system_overview.svg
2026-05-11 20:13:11 -03:00

194 lines
16 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 14.1.2 (0)
-->
<!-- Title: system_overview Pages: 1 -->
<svg width="1531pt" height="306pt"
viewBox="0.00 0.00 1531.00 306.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 301.5)">
<title>system_overview</title>
<polygon fill="#0a0e17" stroke="none" points="-4,4 -4,-301.5 1526.75,-301.5 1526.75,4 -4,4"/>
<text xml:space="preserve" text-anchor="middle" x="761.38" y="-278.3" font-family="Helvetica,sans-Serif" font-size="16.00" fill="#0066ff">Sample app — Lambda + MinIO sandbox</text>
<g id="clust1" class="cluster">
<title>cluster_caller</title>
<polygon fill="#0a0e17" stroke="#1e2a4a" stroke-dasharray="5,2" points="8,-95 8,-228 121,-228 121,-95 8,-95"/>
<text xml:space="preserve" text-anchor="middle" x="64.5" y="-208.8" font-family="Helvetica,sans-Serif" font-size="16.00" fill="#8892a8">Caller</text>
</g>
<g id="clust2" class="cluster">
<title>cluster_lambda</title>
<polygon fill="#0a0e17" stroke="#0066ff" stroke-dasharray="5,2" points="166.5,-108 166.5,-262 1308,-262 1308,-108 166.5,-108"/>
<text xml:space="preserve" text-anchor="middle" x="737.25" y="-242.8" font-family="Helvetica,sans-Serif" font-size="16.00" fill="#0066ff">Lambda execution environment</text>
</g>
<g id="clust3" class="cluster">
<title>cluster_async</title>
<polygon fill="#0a0e17" stroke="#0066ff" stroke-dasharray="1,5" points="409,-116 409,-226 1040.75,-226 1040.75,-116 409,-116"/>
<text xml:space="preserve" text-anchor="middle" x="724.88" y="-206.8" font-family="Helvetica,sans-Serif" font-size="16.00" fill="#8892a8">asyncio.Queue producer / consumer</text>
</g>
<g id="clust4" class="cluster">
<title>cluster_storage</title>
<polygon fill="#0a0e17" stroke="#1e2a4a" stroke-dasharray="5,2" points="1162,-8 1162,-100 1514.75,-100 1514.75,-8 1162,-8"/>
<text xml:space="preserve" text-anchor="middle" x="1338.38" y="-80.8" font-family="Helvetica,sans-Serif" font-size="16.00" fill="#8892a8">Object storage</text>
</g>
<!-- invoke -->
<g id="node1" class="node">
<title>invoke</title>
<polygon fill="#243056" stroke="#1e2a4a" points="113,-192.5 16,-192.5 16,-103.5 113,-103.5 113,-192.5"/>
<text xml:space="preserve" text-anchor="middle" x="64.5" y="-178.05" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">invoke.py</text>
<text xml:space="preserve" text-anchor="middle" x="64.5" y="-164.55" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">(local) /</text>
<text xml:space="preserve" text-anchor="middle" x="64.5" y="-151.05" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">API Gateway,</text>
<text xml:space="preserve" text-anchor="middle" x="64.5" y="-137.55" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">S3 event,</text>
<text xml:space="preserve" text-anchor="middle" x="64.5" y="-124.05" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">Step Functions</text>
<text xml:space="preserve" text-anchor="middle" x="64.5" y="-110.55" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">(real AWS)</text>
</g>
<!-- handler -->
<g id="node2" class="node">
<title>handler</title>
<polygon fill="#1a1a3a" stroke="#1e2a4a" points="321.75,-166 174.5,-166 174.5,-130 321.75,-130 321.75,-166"/>
<text xml:space="preserve" text-anchor="middle" x="248.12" y="-151.05" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">handler(event, context)</text>
<text xml:space="preserve" text-anchor="middle" x="248.12" y="-137.55" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">lambda_function.py</text>
</g>
<!-- invoke&#45;&gt;handler -->
<g id="edge1" class="edge">
<title>invoke&#45;&gt;handler</title>
<path fill="none" stroke="#4a5568" d="M113.22,-148C128.48,-148 145.85,-148 162.92,-148"/>
<polygon fill="#4a5568" stroke="#4a5568" points="162.54,-151.5 172.54,-148 162.54,-144.5 162.54,-151.5"/>
<text xml:space="preserve" text-anchor="middle" x="143.75" y="-150.7" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8892a8">event</text>
</g>
<!-- producer -->
<g id="node3" class="node">
<title>producer</title>
<polygon fill="#0d1a33" stroke="#1e2a4a" points="578.5,-172.25 417,-172.25 417,-123.75 578.5,-123.75 578.5,-172.25"/>
<text xml:space="preserve" text-anchor="middle" x="497.75" y="-157.8" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">producer</text>
<text xml:space="preserve" text-anchor="middle" x="497.75" y="-144.3" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">list_objects_v2 (paginator)</text>
<text xml:space="preserve" text-anchor="middle" x="497.75" y="-130.8" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">filter *.pdf</text>
</g>
<!-- handler&#45;&gt;producer -->
<g id="edge2" class="edge">
<title>handler&#45;&gt;producer</title>
<path fill="none" stroke="#4a5568" d="M322.08,-148C348.16,-148 377.89,-148 405.33,-148"/>
<polygon fill="#4a5568" stroke="#4a5568" points="405.01,-151.5 415.01,-148 405.01,-144.5 405.01,-151.5"/>
<text xml:space="preserve" text-anchor="middle" x="365.25" y="-150.7" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8892a8">spawn task</text>
</g>
<!-- consumer -->
<g id="node5" class="node">
<title>consumer</title>
<polygon fill="#0d1a33" stroke="#1e2a4a" points="1032.75,-181.25 888.5,-181.25 888.5,-132.75 1032.75,-132.75 1032.75,-181.25"/>
<text xml:space="preserve" text-anchor="middle" x="960.62" y="-166.8" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">consumer</text>
<text xml:space="preserve" text-anchor="middle" x="960.62" y="-153.3" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">generate_presigned_url</text>
<text xml:space="preserve" text-anchor="middle" x="960.62" y="-139.8" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">append JSONL</text>
</g>
<!-- handler&#45;&gt;consumer -->
<g id="edge3" class="edge">
<title>handler&#45;&gt;consumer</title>
<path fill="none" stroke="#4a5568" d="M321.87,-165.21C349,-171.06 380.15,-177.09 408.75,-181 569.01,-202.91 611.48,-216.8 772.25,-199 807.08,-195.14 844.9,-187.37 877.38,-179.55"/>
<polygon fill="#4a5568" stroke="#4a5568" points="877.83,-183.05 886.71,-177.27 876.16,-176.25 877.83,-183.05"/>
<text xml:space="preserve" text-anchor="middle" x="630.25" y="-209.83" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8892a8">spawn task</text>
</g>
<!-- response -->
<g id="node9" class="node">
<title>response</title>
<polygon fill="#243056" stroke="#1e2a4a" points="580.75,-100 408.75,-100 408.75,-38 586.75,-38 586.75,-94 580.75,-100"/>
<polyline fill="none" stroke="#1e2a4a" points="580.75,-100 580.75,-94"/>
<polyline fill="none" stroke="#1e2a4a" points="586.75,-94 580.75,-94"/>
<text xml:space="preserve" text-anchor="middle" x="497.75" y="-85.55" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#00c853">response</text>
<text xml:space="preserve" text-anchor="middle" x="497.75" y="-72.05" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#00c853">{count, manifest_key,</text>
<text xml:space="preserve" text-anchor="middle" x="497.75" y="-58.55" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#00c853">manifest_url}</text>
<text xml:space="preserve" text-anchor="middle" x="497.75" y="-45.05" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#00c853">(&lt; 1 KB; sidesteps 6 MB cap)</text>
</g>
<!-- handler&#45;&gt;response -->
<g id="edge11" class="edge">
<title>handler&#45;&gt;response</title>
<path fill="none" stroke="#4a5568" d="M306.87,-129.58C333.84,-120.97 366.73,-110.48 397.51,-100.66"/>
<polygon fill="#4a5568" stroke="#4a5568" points="398.4,-104.05 406.86,-97.68 396.27,-97.38 398.4,-104.05"/>
<text xml:space="preserve" text-anchor="middle" x="365.25" y="-120.6" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8892a8">return</text>
</g>
<!-- queue -->
<g id="node4" class="node">
<title>queue</title>
<path fill="#121829" stroke="#1e2a4a" d="M772.25,-184.28C772.25,-187.63 750.18,-190.34 723,-190.34 695.82,-190.34 673.75,-187.63 673.75,-184.28 673.75,-184.28 673.75,-129.72 673.75,-129.72 673.75,-126.37 695.82,-123.66 723,-123.66 750.18,-123.66 772.25,-126.37 772.25,-129.72 772.25,-129.72 772.25,-184.28 772.25,-184.28"/>
<path fill="none" stroke="#1e2a4a" d="M772.25,-184.28C772.25,-180.94 750.18,-178.22 723,-178.22 695.82,-178.22 673.75,-180.94 673.75,-184.28"/>
<text xml:space="preserve" text-anchor="middle" x="723" y="-166.8" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">asyncio.Queue</text>
<text xml:space="preserve" text-anchor="middle" x="723" y="-153.3" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">maxsize=2000</text>
<text xml:space="preserve" text-anchor="middle" x="723" y="-139.8" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">(backpressure)</text>
</g>
<!-- producer&#45;&gt;queue -->
<g id="edge6" class="edge">
<title>producer&#45;&gt;queue</title>
<path fill="none" stroke="#0066ff" d="M578.66,-148.22C603.39,-148.6 630.71,-149.35 655.75,-150.75 657.91,-150.87 660.11,-151.01 662.34,-151.16"/>
<polygon fill="#0066ff" stroke="#0066ff" points="661.8,-154.63 672.04,-151.88 662.33,-147.65 661.8,-154.63"/>
<text xml:space="preserve" text-anchor="middle" x="630.25" y="-153.45" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8892a8">key</text>
</g>
<!-- minio -->
<g id="node7" class="node">
<title>minio</title>
<path fill="#1a3a1a" stroke="#1e2a4a" d="M1255.75,-59.69C1255.75,-62.1 1236.53,-64.06 1212.88,-64.06 1189.22,-64.06 1170,-62.1 1170,-59.69 1170,-59.69 1170,-20.31 1170,-20.31 1170,-17.9 1189.22,-15.94 1212.88,-15.94 1236.53,-15.94 1255.75,-17.9 1255.75,-20.31 1255.75,-20.31 1255.75,-59.69 1255.75,-59.69"/>
<path fill="none" stroke="#1e2a4a" d="M1255.75,-59.69C1255.75,-57.27 1236.53,-55.31 1212.88,-55.31 1189.22,-55.31 1170,-57.27 1170,-59.69"/>
<text xml:space="preserve" text-anchor="middle" x="1212.88" y="-43.05" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#00c853">MinIO (local)</text>
<text xml:space="preserve" text-anchor="middle" x="1212.88" y="-29.55" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#00c853">or real S3</text>
</g>
<!-- producer&#45;&gt;minio -->
<g id="edge4" class="edge">
<title>producer&#45;&gt;minio</title>
<path fill="none" stroke="#4a5568" d="M578.76,-132.08C608.53,-126.37 642.63,-120.1 673.75,-115 721.03,-107.25 1032.17,-64.57 1158.6,-47.28"/>
<polygon fill="#4a5568" stroke="#4a5568" points="1158.95,-50.76 1168.39,-45.94 1158.01,-43.83 1158.95,-50.76"/>
<text xml:space="preserve" text-anchor="middle" x="830.38" y="-100.82" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8892a8">LIST</text>
</g>
<!-- queue&#45;&gt;consumer -->
<g id="edge7" class="edge">
<title>queue&#45;&gt;consumer</title>
<path fill="none" stroke="#4a5568" d="M772.48,-155.98C778.47,-155.89 784.5,-155.8 790.25,-155.75 825.92,-155.41 834.83,-155.5 870.5,-155.75 872.56,-155.76 874.64,-155.78 876.74,-155.8"/>
<polygon fill="#4a5568" stroke="#4a5568" points="876.57,-159.3 886.6,-155.89 876.64,-152.3 876.57,-159.3"/>
<text xml:space="preserve" text-anchor="middle" x="830.38" y="-158.45" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8892a8">key</text>
</g>
<!-- tmp -->
<g id="node6" class="node">
<title>tmp</title>
<path fill="#121829" stroke="#1e2a4a" d="M1300,-180.28C1300,-183.63 1260.95,-186.34 1212.88,-186.34 1164.8,-186.34 1125.75,-183.63 1125.75,-180.28 1125.75,-180.28 1125.75,-125.72 1125.75,-125.72 1125.75,-122.37 1164.8,-119.66 1212.88,-119.66 1260.95,-119.66 1300,-122.37 1300,-125.72 1300,-125.72 1300,-180.28 1300,-180.28"/>
<path fill="none" stroke="#1e2a4a" d="M1300,-180.28C1300,-176.94 1260.95,-174.22 1212.88,-174.22 1164.8,-174.22 1125.75,-176.94 1125.75,-180.28"/>
<text xml:space="preserve" text-anchor="middle" x="1212.88" y="-162.8" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#ffc107">/tmp/&lt;uuid&gt;.jsonl</text>
<text xml:space="preserve" text-anchor="middle" x="1212.88" y="-149.3" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#ffc107">streamed manifest</text>
<text xml:space="preserve" text-anchor="middle" x="1212.88" y="-135.8" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#ffc107">(ephemeral, 512 MB default)</text>
</g>
<!-- consumer&#45;&gt;tmp -->
<g id="edge9" class="edge">
<title>consumer&#45;&gt;tmp</title>
<path fill="none" stroke="#4a5568" d="M1033,-155.86C1058.16,-155.46 1086.89,-155 1113.86,-154.57"/>
<polygon fill="#4a5568" stroke="#4a5568" points="1113.84,-158.07 1123.78,-154.41 1113.73,-151.07 1113.84,-158.07"/>
<text xml:space="preserve" text-anchor="middle" x="1079.25" y="-158.18" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8892a8">JSONL line</text>
</g>
<!-- consumer&#45;&gt;minio -->
<g id="edge8" class="edge">
<title>consumer&#45;&gt;minio</title>
<path fill="none" stroke="#4a5568" stroke-dasharray="1,5" d="M992.03,-132.46C1008.5,-120.4 1029.72,-106.73 1050.75,-98.5 1074.67,-89.14 1083.23,-96.65 1107.75,-89 1125.6,-83.43 1144.31,-75.39 1160.87,-67.42"/>
<polygon fill="#4a5568" stroke="#4a5568" points="1162.09,-70.72 1169.52,-63.16 1159,-64.44 1162.09,-70.72"/>
<text xml:space="preserve" text-anchor="middle" x="1079.25" y="-112.45" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8892a8">presign</text>
<text xml:space="preserve" text-anchor="middle" x="1079.25" y="-101.2" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8892a8">(local HMAC)</text>
</g>
<!-- tmp&#45;&gt;minio -->
<g id="edge10" class="edge">
<title>tmp&#45;&gt;minio</title>
<path fill="none" stroke="#4a5568" d="M1212.88,-119.53C1212.88,-105.74 1212.88,-89.75 1212.88,-75.73"/>
<polygon fill="#4a5568" stroke="#4a5568" points="1216.38,-76.03 1212.88,-66.03 1209.38,-76.03 1216.38,-76.03"/>
<text xml:space="preserve" text-anchor="middle" x="1198.62" y="-94.56" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8892a8">put_object</text>
<text xml:space="preserve" text-anchor="middle" x="1198.62" y="-83.31" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8892a8">manifests/&lt;uuid&gt;.jsonl</text>
</g>
<!-- minio&#45;&gt;producer -->
<g id="edge5" class="edge">
<title>minio&#45;&gt;producer</title>
<path fill="none" stroke="#4a5568" stroke-dasharray="5,2" d="M1169.68,-40.78C1093.42,-42.74 927.8,-49.54 790.25,-72.75 738.1,-81.55 725.32,-85.28 673.75,-97 642.95,-104 635.14,-105.39 604.75,-114 598.1,-115.88 591.24,-117.9 584.35,-119.99"/>
<polygon fill="#4a5568" stroke="#4a5568" points="583.53,-116.58 574.99,-122.86 585.58,-123.27 583.53,-116.58"/>
<text xml:space="preserve" text-anchor="middle" x="830.38" y="-75.45" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8892a8">page (1000 keys)</text>
</g>
<!-- bucket -->
<g id="node8" class="node">
<title>bucket</title>
<polygon fill="#121829" stroke="#1e2a4a" points="1506.75,-64.25 1503.75,-68.25 1482.75,-68.25 1479.75,-64.25 1337,-64.25 1337,-15.75 1506.75,-15.75 1506.75,-64.25"/>
<text xml:space="preserve" text-anchor="middle" x="1421.88" y="-49.8" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">my&#45;company&#45;reports&#45;bucket</text>
<text xml:space="preserve" text-anchor="middle" x="1421.88" y="-36.3" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">2026/04/*.pdf</text>
<text xml:space="preserve" text-anchor="middle" x="1421.88" y="-22.8" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#e8eaf0">manifests/&lt;uuid&gt;.jsonl</text>
</g>
<!-- minio&#45;&gt;bucket -->
</g>
</svg>