docs(presentation): localize slides and fix diagrams
@@ -3,7 +3,7 @@
|
||||
<desc id="desc">A minimal architecture diagram showing browser clients, FastAPI WebSocket endpoint, room manager, and room broadcasts.</desc>
|
||||
<rect width="960" height="540" fill="#f7f9fc"/>
|
||||
<text x="72" y="74" fill="#101828" font-family="Inter, Arial, sans-serif" font-size="34" font-weight="700">Project Architecture</text>
|
||||
<text x="72" y="108" fill="#667085" font-family="Inter, Arial, sans-serif" font-size="17">Each browser keeps one WebSocket connection. The server broadcasts only inside the selected room.</text>
|
||||
<text x="72" y="108" fill="#667085" font-family="Inter, Arial, sans-serif" font-size="16">Each browser keeps one WebSocket connection. The server broadcasts only inside the selected room.</text>
|
||||
<g font-family="Inter, Arial, sans-serif">
|
||||
<rect x="82" y="168" width="188" height="76" rx="14" fill="#ffffff" stroke="#d0d5dd"/>
|
||||
<text x="126" y="200" fill="#101828" font-size="18" font-weight="700">Client A</text>
|
||||
@@ -25,8 +25,8 @@
|
||||
<path d="M270 334 C318 334 330 310 376 310" fill="none" stroke="#2563eb" stroke-width="4" marker-end="url(#arrow)"/>
|
||||
<path d="M592 240 C642 220 650 210 690 210" fill="none" stroke="#12b76a" stroke-width="4" marker-end="url(#arrow-green)"/>
|
||||
<path d="M592 302 C642 324 650 346 690 346" fill="none" stroke="#12b76a" stroke-width="4" marker-end="url(#arrow-green)"/>
|
||||
<text x="306" y="178" fill="#344054" font-size="14" font-weight="700">send / receive frames</text>
|
||||
<text x="636" y="142" fill="#344054" font-size="14" font-weight="700">ConnectionManager</text>
|
||||
<text x="316" y="178" fill="#344054" font-size="13" font-weight="700">send / receive</text>
|
||||
<text x="668" y="142" fill="#344054" font-size="13" font-weight="700">Room manager</text>
|
||||
</g>
|
||||
<defs>
|
||||
<marker id="arrow" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto">
|
||||
|
||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
@@ -3,7 +3,7 @@
|
||||
<desc id="desc">A browser and server upgrade an HTTP connection to WebSocket and then exchange frames.</desc>
|
||||
<rect width="960" height="540" fill="#f7f9fc"/>
|
||||
<text x="72" y="74" fill="#101828" font-family="Inter, Arial, sans-serif" font-size="34" font-weight="700">HTTP Upgrade to WebSocket</text>
|
||||
<text x="72" y="108" fill="#667085" font-family="Inter, Arial, sans-serif" font-size="17">The connection starts as HTTP, then switches protocols after the handshake.</text>
|
||||
<text x="72" y="108" fill="#667085" font-family="Inter, Arial, sans-serif" font-size="16">The connection starts as HTTP, then switches protocols after the handshake.</text>
|
||||
<g font-family="Inter, Arial, sans-serif">
|
||||
<rect x="86" y="202" width="210" height="126" rx="18" fill="#ffffff" stroke="#d0d5dd"/>
|
||||
<text x="139" y="260" fill="#101828" font-size="22" font-weight="700">Browser</text>
|
||||
@@ -17,7 +17,7 @@
|
||||
<text x="376" y="250" fill="#344054" font-size="15" font-weight="700">2. 101 Switching Protocols</text>
|
||||
<line x1="310" y1="326" x2="650" y2="326" stroke="#7a5af8" stroke-width="4" stroke-dasharray="10 9" marker-end="url(#arrow-purple)"/>
|
||||
<line x1="650" y1="362" x2="310" y2="362" stroke="#7a5af8" stroke-width="4" stroke-dasharray="10 9" marker-end="url(#arrow-purple)"/>
|
||||
<text x="376" y="410" fill="#344054" font-size="15" font-weight="700">3. Full-duplex WebSocket frames over the same TCP connection</text>
|
||||
<text x="342" y="410" fill="#344054" font-size="15" font-weight="700">3. Full-duplex frames over the same TCP connection</text>
|
||||
</g>
|
||||
<defs>
|
||||
<marker id="arrow-blue" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto">
|
||||
|
||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
@@ -3,7 +3,7 @@
|
||||
<desc id="desc">A minimal timeline showing the evolution from AJAX polling to the WebSocket RFC.</desc>
|
||||
<rect width="960" height="540" fill="#f7f9fc"/>
|
||||
<text x="72" y="74" fill="#101828" font-family="Inter, Arial, sans-serif" font-size="34" font-weight="700">WebSocket History</text>
|
||||
<text x="72" y="108" fill="#667085" font-family="Inter, Arial, sans-serif" font-size="17">From repeated HTTP requests to one persistent full-duplex connection</text>
|
||||
<text x="72" y="108" fill="#667085" font-family="Inter, Arial, sans-serif" font-size="16">From repeated HTTP requests to one persistent full-duplex connection</text>
|
||||
<line x1="110" y1="278" x2="850" y2="278" stroke="#c7d7fe" stroke-width="8" stroke-linecap="round"/>
|
||||
<g font-family="Inter, Arial, sans-serif">
|
||||
<circle cx="150" cy="278" r="22" fill="#2563eb"/>
|
||||
@@ -27,6 +27,7 @@
|
||||
<text x="752" y="366" fill="#475467" font-size="15">Chat, games,</text>
|
||||
<text x="740" y="388" fill="#475467" font-size="15">dashboards, IoT</text>
|
||||
</g>
|
||||
<rect x="72" y="150" width="816" height="74" rx="14" fill="#ffffff" stroke="#d0d5dd"/>
|
||||
<text x="106" y="194" fill="#344054" font-family="Inter, Arial, sans-serif" font-size="18">Problem: browsers needed fast server-to-client updates without repeatedly opening new HTTP requests.</text>
|
||||
<rect x="72" y="150" width="816" height="86" rx="14" fill="#ffffff" stroke="#d0d5dd"/>
|
||||
<text x="106" y="186" fill="#344054" font-family="Inter, Arial, sans-serif" font-size="16" font-weight="700">Problem</text>
|
||||
<text x="106" y="212" fill="#344054" font-family="Inter, Arial, sans-serif" font-size="15">Browsers needed fast server-to-client updates without repeatedly opening new HTTP requests.</text>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.6 KiB |
@@ -3,11 +3,11 @@
|
||||
<desc id="desc">A simplified OSI layer diagram showing WebSocket as an application-layer protocol over TCP and IP.</desc>
|
||||
<rect width="960" height="540" fill="#f7f9fc"/>
|
||||
<text x="72" y="74" fill="#101828" font-family="Inter, Arial, sans-serif" font-size="34" font-weight="700">WebSocket in the OSI Model</text>
|
||||
<text x="72" y="108" fill="#667085" font-family="Inter, Arial, sans-serif" font-size="17">WebSocket is used by applications, while TCP/IP carries the bytes through the network.</text>
|
||||
<g font-family="Inter, Arial, sans-serif" font-size="18">
|
||||
<text x="72" y="108" fill="#667085" font-family="Inter, Arial, sans-serif" font-size="16">WebSocket is used by applications, while TCP/IP carries bytes through the network.</text>
|
||||
<g font-family="Inter, Arial, sans-serif" font-size="16">
|
||||
<rect x="116" y="145" width="728" height="56" rx="12" fill="#2563eb"/>
|
||||
<text x="148" y="181" fill="#ffffff" font-weight="700">Layer 7 - Application</text>
|
||||
<text x="492" y="181" fill="#ffffff">HTTP handshake, then WebSocket frames</text>
|
||||
<text x="492" y="181" fill="#ffffff">HTTP upgrade, then WebSocket frames</text>
|
||||
<rect x="116" y="211" width="728" height="48" rx="12" fill="#ffffff" stroke="#d0d5dd"/>
|
||||
<text x="148" y="242" fill="#344054" font-weight="700">Layer 6 - Presentation</text>
|
||||
<text x="492" y="242" fill="#667085">Text, JSON, UTF-8</text>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -3,18 +3,18 @@
|
||||
<desc id="desc">A two-column diagram listing strengths and tradeoffs of WebSocket.</desc>
|
||||
<rect width="960" height="540" fill="#f7f9fc"/>
|
||||
<text x="72" y="74" fill="#101828" font-family="Inter, Arial, sans-serif" font-size="34" font-weight="700">Pros and Cons</text>
|
||||
<text x="72" y="108" fill="#667085" font-family="Inter, Arial, sans-serif" font-size="17">WebSocket is powerful for real-time systems, but it changes server and network responsibilities.</text>
|
||||
<text x="72" y="108" fill="#667085" font-family="Inter, Arial, sans-serif" font-size="16">WebSocket is powerful for real-time systems, with some server and network tradeoffs.</text>
|
||||
<g font-family="Inter, Arial, sans-serif">
|
||||
<rect x="92" y="152" width="350" height="298" rx="20" fill="#ecfdf3" stroke="#abefc6"/>
|
||||
<text x="130" y="202" fill="#067647" font-size="24" font-weight="700">Pros</text>
|
||||
<circle cx="136" cy="250" r="7" fill="#12b76a"/><text x="158" y="256" fill="#344054" font-size="17">Low latency updates</text>
|
||||
<circle cx="136" cy="296" r="7" fill="#12b76a"/><text x="158" y="302" fill="#344054" font-size="17">Full-duplex communication</text>
|
||||
<circle cx="136" cy="342" r="7" fill="#12b76a"/><text x="158" y="348" fill="#344054" font-size="17">Less HTTP overhead after setup</text>
|
||||
<circle cx="136" cy="388" r="7" fill="#12b76a"/><text x="158" y="394" fill="#344054" font-size="17">Great for chat and live dashboards</text>
|
||||
<circle cx="136" cy="342" r="7" fill="#12b76a"/><text x="158" y="348" fill="#344054" font-size="16">Less HTTP overhead</text>
|
||||
<circle cx="136" cy="388" r="7" fill="#12b76a"/><text x="158" y="394" fill="#344054" font-size="16">Great for chat and dashboards</text>
|
||||
<rect x="518" y="152" width="350" height="298" rx="20" fill="#fff1f3" stroke="#fecdd3"/>
|
||||
<text x="556" y="202" fill="#b42318" font-size="24" font-weight="700">Cons</text>
|
||||
<circle cx="562" cy="250" r="7" fill="#f04438"/><text x="584" y="256" fill="#344054" font-size="17">Long-lived connections use memory</text>
|
||||
<circle cx="562" cy="296" r="7" fill="#f04438"/><text x="584" y="302" fill="#344054" font-size="17">Scaling needs shared state or brokers</text>
|
||||
<circle cx="562" cy="250" r="7" fill="#f04438"/><text x="584" y="256" fill="#344054" font-size="16">Long-lived connections use memory</text>
|
||||
<circle cx="562" cy="296" r="7" fill="#f04438"/><text x="584" y="302" fill="#344054" font-size="16">Scaling needs shared state</text>
|
||||
<circle cx="562" cy="342" r="7" fill="#f04438"/><text x="584" y="348" fill="#344054" font-size="17">More connection failure cases</text>
|
||||
<circle cx="562" cy="388" r="7" fill="#f04438"/><text x="584" y="394" fill="#344054" font-size="17">Not ideal for simple CRUD pages</text>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |