Browse Source

doc: Add client/server model picture

Serj Kalichev 2 months ago
parent
commit
7a47bf378c
3 changed files with 117 additions and 0 deletions
  1. 115 0
      docs/klish-client-server.drawio
  2. BIN
      docs/klish-client-server.png
  3. 2 0
      docs/klish3.ru.md

+ 115 - 0
docs/klish-client-server.drawio

@@ -0,0 +1,115 @@
+<mxfile host="Electron" modified="2024-02-22T11:19:15.765Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/23.1.5 Chrome/120.0.6099.109 Electron/28.1.0 Safari/537.36" etag="pGJqnAokYzDXpsI3c7M1" version="23.1.5" type="device">
+  <diagram name="Страница — 1" id="30W0JeJtDvzRnd2ZMywA">
+    <mxGraphModel dx="709" dy="1058" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
+      <root>
+        <mxCell id="0" />
+        <mxCell id="1" parent="0" />
+        <mxCell id="shDmYxE_p5FblS_esGwc-1" value="Клиент klish 1" style="whiteSpace=wrap;html=1;align=center;" vertex="1" parent="1">
+          <mxGeometry x="40" y="80" width="100" height="40" as="geometry" />
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-2" value="Клиент klish n" style="whiteSpace=wrap;html=1;align=center;" vertex="1" parent="1">
+          <mxGeometry x="40" y="160" width="100" height="40" as="geometry" />
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-3" value="&lt;font style=&quot;font-size: 32px;&quot;&gt;...&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+          <mxGeometry x="40" y="120" width="100" height="20" as="geometry" />
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-4" value="&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Слушающий&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; klishd сервер" style="whiteSpace=wrap;html=1;align=center;" vertex="1" parent="1">
+          <mxGeometry x="240" y="80" width="160" height="120" as="geometry" />
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-5" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.013;entryY=0.825;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryPerimeter=0;" edge="1" parent="1">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="140" y="180" as="sourcePoint" />
+            <mxPoint x="242.08000000000004" y="179" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-6" value="Соединение" style="edgeLabel;resizable=0;html=1;;align=center;verticalAlign=middle;" connectable="0" vertex="1" parent="shDmYxE_p5FblS_esGwc-5">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-7" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.013;entryY=0.825;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryPerimeter=0;" edge="1" parent="1">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="140" y="100.5" as="sourcePoint" />
+            <mxPoint x="242" y="99.5" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-8" value="Соединение" style="edgeLabel;resizable=0;html=1;;align=center;verticalAlign=middle;" connectable="0" vertex="1" parent="shDmYxE_p5FblS_esGwc-7">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-9" value="Обслуживающий&lt;br&gt;klishd сервер 1" style="whiteSpace=wrap;html=1;align=center;" vertex="1" parent="1">
+          <mxGeometry x="500" y="80" width="100" height="40" as="geometry" />
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-10" value="Обслуживающий&lt;br&gt;klishd сервер n" style="whiteSpace=wrap;html=1;align=center;" vertex="1" parent="1">
+          <mxGeometry x="500" y="160" width="100" height="40" as="geometry" />
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-11" value="&lt;font style=&quot;font-size: 32px;&quot;&gt;...&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+          <mxGeometry x="500" y="120" width="100" height="20" as="geometry" />
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-12" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.013;entryY=0.825;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryPerimeter=0;" edge="1" parent="1">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="400" y="180.25" as="sourcePoint" />
+            <mxPoint x="502" y="179.25" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-13" value="fork()" style="edgeLabel;resizable=0;html=1;;align=center;verticalAlign=middle;" connectable="0" vertex="1" parent="shDmYxE_p5FblS_esGwc-12">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-14" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.013;entryY=0.825;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryPerimeter=0;" edge="1" parent="1">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="400" y="100.5" as="sourcePoint" />
+            <mxPoint x="502" y="99.5" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-15" value="fork()" style="edgeLabel;resizable=0;html=1;;align=center;verticalAlign=middle;" connectable="0" vertex="1" parent="shDmYxE_p5FblS_esGwc-14">
+          <mxGeometry relative="1" as="geometry" />
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-16" value="UNIX socket" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+          <mxGeometry x="230" y="125" width="60" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-17" value="" style="endArrow=none;html=1;rounded=0;entryX=0.25;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" target="shDmYxE_p5FblS_esGwc-4">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="280" y="200" as="sourcePoint" />
+            <mxPoint x="280" y="90" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-30" value="" style="endArrow=classic;html=1;rounded=0;dashed=1;startArrow=classic;startFill=1;" edge="1" parent="1">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="120" y="80" as="sourcePoint" />
+            <mxPoint x="520" y="80" as="targetPoint" />
+            <Array as="points">
+              <mxPoint x="120" y="50" />
+              <mxPoint x="520" y="50" />
+            </Array>
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-31" value="Протокол KTP" style="edgeLabel;resizable=0;html=1;;align=center;verticalAlign=middle;" connectable="0" vertex="1" parent="shDmYxE_p5FblS_esGwc-30">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="-1" as="offset" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-34" value="" style="endArrow=classic;html=1;rounded=0;dashed=1;startArrow=classic;startFill=1;entryX=0.195;entryY=1.035;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" target="shDmYxE_p5FblS_esGwc-10">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="120" y="201" as="sourcePoint" />
+            <mxPoint x="520" y="260" as="targetPoint" />
+            <Array as="points">
+              <mxPoint x="120" y="230" />
+              <mxPoint x="520" y="230" />
+            </Array>
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-35" value="Протокол KTP" style="edgeLabel;resizable=0;html=1;;align=center;verticalAlign=middle;" connectable="0" vertex="1" parent="shDmYxE_p5FblS_esGwc-34">
+          <mxGeometry relative="1" as="geometry">
+            <mxPoint x="-1" as="offset" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-36" value="1" style="ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={&quot;edgeStyle&quot;:&quot;entityRelationEdgeStyle&quot;,&quot;startArrow&quot;:&quot;none&quot;,&quot;endArrow&quot;:&quot;none&quot;,&quot;segment&quot;:10,&quot;curved&quot;:1,&quot;sourcePerimeterSpacing&quot;:0,&quot;targetPerimeterSpacing&quot;:0};treeFolding=1;treeMoving=1;" vertex="1" parent="1">
+          <mxGeometry x="180" y="70" width="20" height="20" as="geometry" />
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-37" value="2" style="ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={&quot;edgeStyle&quot;:&quot;entityRelationEdgeStyle&quot;,&quot;startArrow&quot;:&quot;none&quot;,&quot;endArrow&quot;:&quot;none&quot;,&quot;segment&quot;:10,&quot;curved&quot;:1,&quot;sourcePerimeterSpacing&quot;:0,&quot;targetPerimeterSpacing&quot;:0};treeFolding=1;treeMoving=1;" vertex="1" parent="1">
+          <mxGeometry x="440" y="70" width="20" height="20" as="geometry" />
+        </mxCell>
+        <mxCell id="shDmYxE_p5FblS_esGwc-38" value="3" style="ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={&quot;edgeStyle&quot;:&quot;entityRelationEdgeStyle&quot;,&quot;startArrow&quot;:&quot;none&quot;,&quot;endArrow&quot;:&quot;none&quot;,&quot;segment&quot;:10,&quot;curved&quot;:1,&quot;sourcePerimeterSpacing&quot;:0,&quot;targetPerimeterSpacing&quot;:0};treeFolding=1;treeMoving=1;" vertex="1" parent="1">
+          <mxGeometry x="310" y="20" width="20" height="20" as="geometry" />
+        </mxCell>
+      </root>
+    </mxGraphModel>
+  </diagram>
+</mxfile>

BIN
docs/klish-client-server.png


+ 2 - 0
docs/klish3.ru.md

@@ -47,6 +47,8 @@ Klish в первую очередь рассчитан на подход Cisco,
 
 ## Основные сведения
 
+![Клиент-серверная модель Klish](/klish-client-server.png "Клиент-серверная модель Klish")
+
 Основа проекта klish - библиотека libklish. На ее основе построены клиент klish
 и сервер klishd. Основную работу выполняет сервер klishd. Он загружает
 конфигурацию команд и ожидает запросов от клиентов. Взаимодействие между