This commit is contained in:
2026-06-25 11:46:39 +09:00
commit 06a95a6d5b
56 changed files with 10023 additions and 0 deletions
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1100 600" font-family="Helvetica, Arial, sans-serif">
<defs>
<marker id="arr" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">
<path d="M0,0 L10,5 L0,10 z" fill="#37474f"/>
</marker>
<marker id="arrRed" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">
<path d="M0,0 L10,5 L0,10 z" fill="#c62828"/>
</marker>
</defs>
<text x="550" y="32" text-anchor="middle" font-size="20" font-weight="700" fill="#102a43">Resume Token 시퀀스 — 단절-재접속 이어받기</text>
<text x="550" y="55" text-anchor="middle" font-size="13" fill="#486581">T3 디바이스 또는 T2 게이트웨이의 일시 단절 시, gRPC 스트리밍 위치 보존</text>
<!-- Lanes -->
<line x1="180" y1="100" x2="180" y2="540" stroke="#9e9e9e" stroke-width="1.5" stroke-dasharray="4,3"/>
<line x1="500" y1="100" x2="500" y2="540" stroke="#9e9e9e" stroke-width="1.5" stroke-dasharray="4,3"/>
<line x1="820" y1="100" x2="820" y2="540" stroke="#9e9e9e" stroke-width="1.5" stroke-dasharray="4,3"/>
<!-- Lane labels -->
<rect x="60" y="85" width="120" height="40" rx="6" fill="#fff3e0" stroke="#e65100"/>
<text x="120" y="110" text-anchor="middle" font-size="13" font-weight="700" fill="#bf360c">T3 Device</text>
<rect x="380" y="85" width="120" height="40" rx="6" fill="#e0f7fa" stroke="#00838f"/>
<text x="440" y="110" text-anchor="middle" font-size="13" font-weight="700" fill="#006064">T2 Gateway</text>
<rect x="700" y="85" width="120" height="40" rx="6" fill="#e3f2fd" stroke="#1976d2"/>
<text x="760" y="110" text-anchor="middle" font-size="13" font-weight="700" fill="#0d47a1">T1 Server</text>
<!-- 1. Start streaming -->
<text x="40" y="160" font-size="12" font-weight="700" fill="#102a43">① Start</text>
<line x1="500" y1="160" x2="820" y2="160" stroke="#37474f" stroke-width="2" marker-end="url(#arr)"/>
<text x="660" y="155" text-anchor="middle" font-size="11" fill="#006064">StartStream(token=null)</text>
<!-- 2. Server streams data -->
<text x="40" y="200" font-size="12" font-weight="700" fill="#102a43">② Stream</text>
<line x1="820" y1="200" x2="180" y2="200" stroke="#37474f" stroke-width="2" marker-end="url(#arr)"/>
<text x="500" y="195" text-anchor="middle" font-size="11" fill="#0d47a1">Data[1..1000] (Protobuf streaming)</text>
<line x1="820" y1="230" x2="180" y2="230" stroke="#37474f" stroke-width="2" marker-end="url(#arr)"/>
<line x1="820" y1="260" x2="180" y2="260" stroke="#37474f" stroke-width="2" marker-end="url(#arr)"/>
<text x="500" y="278" text-anchor="middle" font-size="11" fill="#0d47a1">Data[1001..2000] ...</text>
<!-- 3. Network disruption -->
<text x="40" y="320" font-size="12" font-weight="700" fill="#c62828">③ Disrupt</text>
<line x1="180" y1="305" x2="820" y2="305" stroke="#c62828" stroke-width="3" stroke-dasharray="8,4" marker-end="url(#arrRed)"/>
<text x="500" y="298" text-anchor="middle" font-size="11" font-weight="700" fill="#c62828">⚠ Network Disconnected (Wi-Fi/5G handover)</text>
<text x="40" y="345" font-size="12" font-weight="700" fill="#102a43">④ Cache</text>
<text x="500" y="345" font-size="11" fill="#006064">T2: 큐잉 + 마지막 Token = "TKN@2000" 저장</text>
<text x="500" y="365" font-size="11" fill="#006064">T3: 오프라인 큐 + Resume Token 보관</text>
<!-- 5. Reconnect with token -->
<text x="40" y="410" font-size="12" font-weight="700" fill="#102a43">⑤ Reconnect</text>
<line x1="180" y1="410" x2="820" y2="410" stroke="#37474f" stroke-width="2" marker-end="url(#arr)"/>
<text x="500" y="405" text-anchor="middle" font-size="11" fill="#bf360c">StartStream(token="TKN@2000") via metadata</text>
<!-- 6. Resume from 2001 -->
<text x="40" y="450" font-size="12" font-weight="700" fill="#102a43">⑥ Resume</text>
<line x1="820" y1="450" x2="180" y2="450" stroke="#37474f" stroke-width="2" marker-end="url(#arr)"/>
<line x1="820" y1="480" x2="180" y2="480" stroke="#37474f" stroke-width="2" marker-end="url(#arr)"/>
<text x="500" y="445" text-anchor="middle" font-size="11" fill="#0d47a1">Data[2001..3000] (이어서 전송)</text>
<text x="500" y="475" text-anchor="middle" font-size="11" fill="#0d47a1">Data[3001..4000] ...</text>
<!-- 7. Trace continues -->
<text x="40" y="520" font-size="12" font-weight="700" fill="#102a43">⑦ Trace</text>
<text x="500" y="520" font-size="11" fill="#486581">단절-재접속에도 W3C traceparent가 Token에 임베드되어 trace 연속성 유지</text>
<!-- bottom note -->
<text x="550" y="565" text-anchor="middle" font-size="11" font-style="italic" fill="#486581">구현: gRPC ClientInterceptor에서 Resume Token을 Metadata 헤더에 자동 주입·추출</text>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB