Files
hse-2026/materials/11-consensus/seminar/media/payment-2pc-zookeeper.svg
T
2026-11-28 00:56:20 +03:00

42 lines
2.6 KiB
XML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="320" viewBox="0 0 1024 320" role="img" aria-labelledby="title desc">
<title id="title">Шарды читают решение координатора из ZooKeeper</title>
<desc id="desc">Получив оба голоса yes, координатор записал commit в ZooKeeper по пути /pay-42/decision и отключился. Шард Ани и шард магазина могут каждый самостоятельно прочитать эту запись, чтобы узнать исход перевода.</desc>
<defs>
<marker id="arrow" 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="#245795"/>
</marker>
</defs>
<style>
text { font-family: Arial, Helvetica, sans-serif; fill: #193456; text-anchor: middle; }
.heading { font-size: 24px; font-weight: 700; }
.body { font-size: 20px; }
.value { font: 20px Menlo, Consolas, monospace; }
.shard { fill: #f6f9fd; stroke: #82a4ce; stroke-width: 1.5; }
.edge { fill: none; stroke: #245795; stroke-width: 2.5; marker-end: url(#arrow); }
</style>
<rect width="1024" height="320" fill="#fff"/>
<rect x="339" y="12" width="346" height="52" rx="9" fill="#fff4f1" stroke="#bb6558" stroke-width="1.5"/>
<path d="M356 32l13 13 M369 32l-13 13" fill="none" stroke="#a43d30" stroke-width="3.5" stroke-linecap="round"/>
<text x="525" y="46" font-size="22" font-weight="700">Координатор отключился</text>
<path class="edge" d="M512 65 V119"/>
<text class="body" x="664" y="98">До отключения записал commit</text>
<rect x="319" y="122" width="386" height="80" rx="9" fill="#eaf2fc" stroke="#5280b6" stroke-width="2"/>
<text class="heading" x="512" y="154">ZooKeeper</text>
<text class="value" x="512" y="185">/pay-42/decision = <tspan font-weight="bold">commit</tspan></text>
<path class="edge" d="M247 239 V164 H315"/>
<path class="edge" d="M777 239 V164 H709"/>
<text class="body" x="150" y="205">Читает решение</text>
<text class="body" x="874" y="205">Читает решение</text>
<rect class="shard" x="24" y="239" width="446" height="70" rx="9"/>
<rect class="shard" x="554" y="239" width="446" height="70" rx="9"/>
<text class="heading" x="247" y="269">Шард Ани</text>
<text class="body" x="247" y="295">Списание 20 000 ₽</text>
<text class="heading" x="777" y="269">Шард магазина</text>
<text class="body" x="777" y="295">Зачисление 20 000 ₽</text>
</svg>