Add week 9 materials

This commit is contained in:
osukhoroslov committed 2026-11-12 11:31:33 +03:00
1 parent 8963ac82d5
commit a4dc591ca0
12 files changed
+383

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="730px" height="513px" viewBox="-0.5 -0.5 730 513" content="&lt;mxfile host=&quot;app.diagrams.net&quot; modified=&quot;2021-04-20T21:20:52.582Z&quot; agent=&quot;5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36&quot; etag=&quot;zU370sZN0VRoGCvcs8OI&quot; version=&quot;14.6.1&quot; type=&quot;google&quot;&gt;&lt;diagram id=&quot;k1PHZbrOtdCraHrjyHFp&quot; name=&quot;Page-1&quot;&gt;7VvbcuI4EP0aHqFsWfLlMUCSue0kNUnt7WVL2AKcGIsRIsB+/Uq2bCzZCfdAzSYzleBWu2W3Th91t03L6U2WtwxPx7/RiCQtYEXLltNvAWCjwBN/pGSlJJbv5pIRiyMlWwse4n9Joaik8zgiM02RU5rweKoLQ5qmJOSaDDNGF7rakCb6rFM8IjXBQ4iTuvSPOOLjXOojay3/ROLRuJjZttTIAIfPI0bnqZqvBZwb++bq+jofnuDCltKfjXFEFxWRc91yeoxSnn+aLHskkc4t3Jafd/PKaHndjKR8mxMG3+4jcPOZUX775efT4K79/cekDUFu5gUnc1LcR3a1fFV4aMYZfS6dY7ec7phPEvVR3NVU6k2WIwmQzjChi3CMGe/MuPj9j7jN7mIcc/IwxaFUXAg1IcscR6K1ldw38mCU4JlcVEsOPBMejtXBME6SHk0oy67LGQ6HIAyFPMKz8dpUdrUVtcgduMiVp9OU3+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NtiYW2o75gudLbdMRsf0B28Y2aHYv97UPdLGR/TEU1xcr2WdsO5YLWCdXZHibafvvG8w9iIz7W/wsAoxC3DxNb7q23sr8F2+6uAG15V1KZSYbbDBSNkREZu8bibd1PpddzQORj7Gsxfxe3TfDJViu4OeeKlwFPsBXvC02jal+nge6V/x6xWNpCv1UEa856fdU9Ao/5F49Qx4bU1To13PxBAp8Jp6t0/9T/Pf6AhnbLw91WU3Pj79OnNKgW98qLHDzJN5Kpvmf7Llc0yUD0IVLepr1pN9WR0EkdRtpEzIi4KD/I0UhyrnUUYR90W6gtJIs13y1ev9i8M3g55M28s3z9TF9eqvsPVlE+KZAqio+C0rbdx2o6rW6DD4YycBFh7tNc/gPVq6bEzhER61hHlFXQciCAMkK3TlS+7fZ4ntkkQ+L5b9PF2AJavAwu+F66aippTtVUU0LJyGFhDHHKaN7v7rcOfd/8C7Q4UAD1bQ+/Y7mhEBzwROqrv4fTyxW9usMHWMRpsdqNt8D+CFvT0vMi1QA1aZdJ1bGgxbg96V0/d2+/P9/4d77PV3ZfGDe14Cb29KTH3Q9KcmA98BNEuOXilbgDQfMoBgg3VQ3P6v4y5em4CfHWsDKLieG1PHqwqBzVru/VsGguDRvjlSfkba7xtMeKds/bwjNrD37v2cPerkXdt4SBPfz0Jml82qNVE/lv6B7d83lr6C+qTe74Ffdvyge1ZFsq+hWA0yi1H/rcdJ7A9N/AayXx3HnmVOJiAv7pl1yoDryFXrYXe1u+nA9et0/zJ2uaNQDh91/ydeN5o/VVo3/VKgWLpja36Rtrfnnm3a++c7aGz8e5PQTjvxqjHIrGm9PcXw66P9GZnx4ZoH+xWUhZbz1igt3PGcoYUBJ01YIwUBJov/WwbMBD6Hcu2yh+9nkSe0zGfT+0dQeJw/X3JXH39rVTn+j8=&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(241, 250, 238);"><defs/><g><ellipse cx="266" cy="252" rx="170" ry="170" fill="#000000" stroke="#000000" stroke-dasharray="3 3" pointer-events="all" transform="translate(2,3)" opacity="0.25"/><ellipse cx="266" cy="252" rx="170" ry="170" fill="#fff2cc" stroke="#d6b656" stroke-dasharray="3 3" pointer-events="all"/><ellipse cx="122.25" cy="335" rx="36.25" ry="35" fill="#000000" stroke="#000000" stroke-dasharray="3 3" pointer-events="all" transform="translate(2,3)" opacity="0.25"/><ellipse cx="122.25" cy="335" rx="36.25" ry="35" fill="#f0e3c0" stroke="#1a1a1a" stroke-dasharray="3 3" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 71px; height: 1px; padding-top: 335px; margin-left: 87px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; "><span style="font-size: 14px">Server 4</span></div></div></div></foreignObject><text x="122" y="339" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">Server 4</text></switch></g><ellipse cx="422.25" cy="165" rx="36.25" ry="35" fill="#000000" stroke="#000000" stroke-dasharray="3 3" pointer-events="all" transform="translate(2,3)" opacity="0.25"/><ellipse cx="422.25" cy="165" rx="36.25" ry="35" fill="#f0e3c0" stroke="#1a1a1a" stroke-dasharray="3 3" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-aliLine truncated

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="249px" preserveAspectRatio="none" style="width:699px;height:249px;background:#FFFFFF;" version="1.1" viewBox="0 0 699 249" width="699px" zoomAndPan="magnify"><defs/><g><g id="elem_Client"><rect fill="#F1F1F1" height="21.6094" style="stroke:#181818;stroke-width:0.5;" width="50" x="7" y="49"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="36" x="14" y="65.5332">Client</text></g><g id="elem_KVStore"><rect fill="#F1F1F1" height="21.6094" style="stroke:#181818;stroke-width:0.5;" width="66" x="271.5" y="49"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="52" x="278.5" y="65.5332">KVStore</text></g><g id="elem_Log"><rect fill="#F1F1F1" height="108.0469" style="stroke:#181818;stroke-width:0.5;" width="139" x="235" y="134"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="24" x="292.5" y="150.5332">Log</text><line style="stroke:#181818;stroke-width:1.0;" x1="235" x2="374" y1="155.6094" y2="155.6094"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="8" x="240" y="172.1426">1</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="111" x="258" y="172.1426">Set(key1, value1)</text><line style="stroke:#181818;stroke-width:1.0;" x1="253" x2="253" y1="155.6094" y2="177.2188"/><line style="stroke:#181818;stroke-width:1.0;" x1="235" x2="374" y1="177.2188" y2="177.2188"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="8" x="240" y="193.752">2</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="111" x="258" y="193.752">Set(key2, value4)</text><line style="stroke:#181818;stroke-width:1.0;" x1="253" x2="253" y1="177.2188" y2="198.8281"/><line style="stroke:#181818;stroke-width:1.0;" x1="235" x2="374" y1="198.8281" y2="198.8281"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="8" x="240" y="215.3613">3</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="111" x="258" y="215.3613">Set(key3, value3)</text><line style="stroke:#181818;stroke-width:1.0;" x1="253" x2="253" y1="198.8281" y2="220.4375"/><line style="stroke:#181818;stroke-width:1.0;" x1="235" x2="374" y1="220.4375" y2="220.4375"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="8" x="240" y="236.9707">4</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="111" x="258" y="236.9707">Set(key4, value4)</text><line style="stroke:#181818;stroke-width:1.0;" x1="253" x2="253" y1="220.4375" y2="242.0469"/></g><g id="elem_GMN149"><path d="M565,165 L565,182.5 L382.22,186.5 L565,190.5 L565,207.7031 A0,0 0 0 0 565,207.7031 L692,207.7031 A0,0 0 0 0 692,207.7031 L692,175 L682,165 L565,165 A0,0 0 0 0 565,165 " fill="#F7F8FE" style="stroke:#181818;stroke-width:0.5;"/><path d="M682,165 L682,175 L692,175 L682,165 " fill="#F7F8FE" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="97" x="571" y="183.4951">Write Ahead Log</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="106" x="571" y="199.8467">/var/log/wal000.log</text></g><g id="elem_Storage"><rect fill="#F1F1F1" height="108.0469" style="stroke:#181818;stroke-width:0.5;" width="92" x="582.5" y="7"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="50" x="603.5" y="23.5332">Storage</text><line style="stroke:#181818;stroke-width:1.0;" x1="582.5" x2="674.5" y1="28.6094" y2="28.6094"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="30" x="587.5" y="45.1426">key1</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="42" x="627.5" y="45.1426">value1</text><line style="stroke:#181818;stroke-width:1.0;" x1="622.5" x2="622.5" y1="28.6094" y2="50.2188"/><line style="stroke:#181818;stroke-width:1.0;" x1="582.5" x2="674.5" y1="50.2188" y2="50.2188"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="30" x="587.5" y="66.752">key2</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="42" x="627.5" y="66.752">value2</text><line style="stroke:#181818;stroke-width:1.0;" x1="622.5" x2="622.5" y1="50.2188" y2="71.8281"/><line style="stroke:#181818;stroke-width:1.0;" x1="582.5" x2="674.5" y1="71.8281" y2="71.8281"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" texLine truncated
link Client to KVStore--><g id="link_Client_KVStore"><path codeLine="36" d="M65.09,59.5 C112.95,59.5 203.23,59.5 257.92,59.5 " fill="none" id="Client-to-KVStore" style="stroke:#070D4A;stroke-width:1.0;"/><polygon fill="#070D4A" points="263.1,59.5,254.1,55.5,258.1,59.5,254.1,63.5,263.1,59.5" style="stroke:#070D4A;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="100" x="96" y="55.9951">Set(key4, value4)</text></g><!--MD5=[d15b131dd1a0d42a2b4e7ff26cddba69]
link KVStore to Log--><g id="link_KVStore_Log"><path codeLine="37" d="M304.5,77.7 C304.5,90.1 304.5,107.32 304.5,124.4 " fill="none" id="KVStore-to-Log" style="stroke:#070D4A;stroke-width:1.0;"/><polygon fill="#070D4A" points="304.5,129.69,308.5,120.69,304.5,124.69,300.5,120.69,304.5,129.69" style="stroke:#070D4A;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="59" x="263" y="109.2451">1. Append</text></g><!--MD5=[937f200f8032e7ed6e8781237a59e151]
link KVStore to Storage--><g id="link_KVStore_Storage"><path codeLine="38" d="M345.63,59.5 C401.79,59.5 504.2,59.5 568.9,59.5 " fill="none" id="KVStore-to-Storage" style="stroke:#070D4A;stroke-width:1.0;"/><polygon fill="#070D4A" points="574.26,59.5,565.26,55.5,569.26,59.5,565.26,63.5,574.26,59.5" style="stroke:#070D4A;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="121" x="413" y="55.9951">2. Set(Key4, Value4)</text></g><!--MD5=[5ce81b978b9f5bd89690ef5bf57354bc]
@startuml
left to right direction
!include ../style.puml
map Client {
}
map KVStore {
}
map Log {
1=>Set(key1, value1)
2=>Set(key2, value4)
3=>Set(key3, value3)
4=>Set(key4, value4)
}
note right of Log
Write Ahead Log
/var/log/wal000.log
end note
map Storage {
key1=>value1
key2=>value2
key3=>value3
key4=>value4
}
Client - -> KVStore: Set(key4, value4)
KVStore -r-> Log: 1. Append
KVStore -d-> Storage: 2. Set(Key4, Value4)
@enduml
@startuml
left to right direction
skinparam shadowing false
skinparam sequenceParticipant{
BackgroundColor #F7F8FE
BorderColor #070D4A
}
skinparam sequenceLifeLine {
BackgroundColor #F7F8FE
BorderColor #070D4A
}
skinparam sequence {
ArrowColor #070D4A
}
skinparam Note {
BackgroundColor #F7F8FE
BorderColor #070D4A
}
skinparam Node {
BackgroundColor #F7F8FE
BorderColor #070D4A
}
skinparam object {
BackgroundColor #F7F8FE
BorderColor #070D4A
}
skinparam actor {
BackgroundColor #F7F8FE
BorderColor #070D4A
}
hide footbox
map Client {
}
map KVStore {
}
map Log {
1=>Set(key1, value1)
2=>Set(key2, value4)
3=>Set(key3, value3)
4=>Set(key4, value4)
}
note right of Log
Write Ahead Log
/var/log/wal000.log
end note
map Storage {
key1=>value1
key2=>value2
key3=>value3
key4=>value4
}
Client - -> KVStore: Set(key4, value4)
KVStore -r-> Log: 1. Append
KVStore -d-> Storage: 2. Set(Key4, Value4)
@enduml
PlantUML version 1.2022.6(Tue Jun 21 14:34:49 ADT 2022)
(GPL source distribution)
Java Runtime: Java(TM) SE Runtime Environment
JVM: Java HotSpot(TM) 64-Bit Server VM
Default Encoding: UTF-8
Language: en
Country: CA
--></g></svg>

After

Width:  |  Height:  |  Size: 8.8 KiB