github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/docs/actor-system-poll-sequence.svg (about) 1 <?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" contentScriptType="application/ecmascript" contentStyleType="text/css" height="535px" preserveAspectRatio="none" style="width:529px;height:535px;background:#FFFFFF;" version="1.1" viewBox="0 0 529 535" width="529px" zoomAndPan="magnify"><defs><filter height="300%" id="f1jotxap47aatu" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="37" x2="37" y1="40.2969" y2="492.1563"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="151" x2="151" y1="40.2969" y2="492.1563"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="224" x2="224" y1="40.2969" y2="492.1563"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="331.5" x2="331.5" y1="40.2969" y2="492.1563"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="448" x2="448" y1="40.2969" y2="492.1563"/><rect fill="#FEFECE" filter="url(#f1jotxap47aatu)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="61" x="5" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="47" x="12" y="24.9951">Router</text><rect fill="#FEFECE" filter="url(#f1jotxap47aatu)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="61" x="5" y="491.1563"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="47" x="12" y="511.1514">Router</text><rect fill="#FEFECE" filter="url(#f1jotxap47aatu)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="65" x="117" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="51" x="124" y="24.9951">Mailbox</text><rect fill="#FEFECE" filter="url(#f1jotxap47aatu)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="65" x="117" y="491.1563"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="51" x="124" y="511.1514">Mailbox</text><rect fill="#FEFECE" filter="url(#f1jotxap47aatu)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="52" x="196" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="38" x="203" y="24.9951">ready</text><rect fill="#FEFECE" filter="url(#f1jotxap47aatu)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="52" x="196" y="491.1563"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="38" x="203" y="511.1514">ready</text><rect fill="#FEFECE" filter="url(#f1jotxap47aatu)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="65" x="297.5" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="51" x="304.5" y="24.9951">System</text><rect fill="#FEFECE" filter="url(#f1jotxap47aatu)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="65" x="297.5" y="491.1563"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="51" x="304.5" y="511.1514">System</text><rect fill="#FEFECE" filter="url(#f1jotxap47aatu)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="50" x="421" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="36" x="428" y="24.9951">Actor</text><rect fill="#FEFECE" filter="url(#f1jotxap47aatu)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="50" x="421" y="491.1563"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="36" x="428" y="511.1514">Actor</text><line style="stroke:#A80036;stroke-width:1.0;" x1="37.5" x2="79.5" y1="71.4297" y2="71.4297"/><line style="stroke:#A80036;stroke-width:1.0;" x1="79.5" x2="79.5" y1="71.4297" y2="84.4297"/><line style="stroke:#A80036;stroke-width:1.0;" x1="38.5" x2="79.5" y1="84.4297" y2="84.4297"/><polygon fill="#A80036" points="48.5,80.4297,38.5,84.4297,48.5,88.4297,44.5,84.4297" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="78" x="44.5" y="66.3638">Send(msgs)</text><line style="stroke:#A80036;stroke-width:1.0;" x1="37.5" x2="79.5" y1="113.5625" y2="113.5625"/><line style="stroke:#A80036;stroke-width:1.0;" x1="79.5" x2="79.5" y1="113.5625" y2="126.5625"/><line style="stroke:#A80036;stroke-width:1.0;" x1="38.5" x2="79.5" y1="126.5625" y2="126.5625"/><polygon fill="#A80036" points="48.5,122.5625,38.5,126.5625,48.5,130.5625,44.5,126.5625" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="55" x="44.5" y="108.4966">find proc</text><polygon fill="#A80036" points="139.5,181.9609,149.5,185.9609,139.5,189.9609,143.5,185.9609" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="37.5" x2="145.5" y1="185.9609" y2="185.9609"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="28" x="44.5" y="150.6294">proc</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="52.5" y="165.7622">.Mailbox</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="82" x="52.5" y="180.895">.Send(msgs)</text><polygon fill="#A80036" points="212,211.0938,222,215.0938,212,219.0938,216,215.0938" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="37.5" x2="218" y1="215.0938" y2="215.0938"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="95" x="44.5" y="210.0278">schedule(proc)</text><line style="stroke:#A80036;stroke-width:1.0;" x1="224" x2="266" y1="244.2266" y2="244.2266"/><line style="stroke:#A80036;stroke-width:1.0;" x1="266" x2="266" y1="244.2266" y2="257.2266"/><line style="stroke:#A80036;stroke-width:1.0;" x1="225" x2="266" y1="257.2266" y2="257.2266"/><polygon fill="#A80036" points="235,253.2266,225,257.2266,235,261.2266,231,257.2266" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="94" x="231" y="239.1606">enqueue(proc)</text><polygon fill="#A80036" points="320,282.3594,330,286.3594,320,290.3594,324,286.3594" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="224" x2="326" y1="286.3594" y2="286.3594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="47" x="231" y="281.2935">signal()</text><polygon fill="#A80036" points="235,311.4922,225,315.4922,235,319.4922,231,315.4922" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="229" x2="331" y1="315.4922" y2="315.4922"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="70" x="241" y="310.4263">fetchProc()</text><polygon fill="#A80036" points="320,340.625,330,344.625,320,348.625,324,344.625" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="224" x2="326" y1="344.625" y2="344.625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="71" x="231" y="339.5591">return proc</text><polygon fill="#A80036" points="436,369.7578,446,373.7578,436,377.7578,440,373.7578" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="332" x2="442" y1="373.7578" y2="373.7578"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="92" x="339" y="368.6919">poll proc.Actor</text><polygon fill="#A80036" points="162.5,398.8906,152.5,402.8906,162.5,406.8906,158.5,402.8906" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="156.5" x2="447" y1="402.8906" y2="402.8906"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="66" x="168.5" y="397.8247">tryReceive</text><polygon fill="#A80036" points="436,428.0234,446,432.0234,436,436.0234,440,432.0234" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="151.5" x2="442" y1="432.0234" y2="432.0234"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="78" x="158.5" y="426.9575">return msgs</text><line style="stroke:#A80036;stroke-width:1.0;" x1="448" x2="490" y1="461.1563" y2="461.1563"/><line style="stroke:#A80036;stroke-width:1.0;" x1="490" x2="490" y1="461.1563" y2="474.1563"/><line style="stroke:#A80036;stroke-width:1.0;" x1="449" x2="490" y1="474.1563" y2="474.1563"/><polygon fill="#A80036" points="459,470.1563,449,474.1563,459,478.1563,455,474.1563" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="67" x="455" y="456.0903">Poll(msgs)</text><!--MD5=[225c9977a67d43882dfde892ff632f24] 2 @startuml Actor system poll sequence 3 4 Router -> Router : Send(msgs) 5 6 Router -> Router : find proc 7 8 Router -> Mailbox : proc\n .Mailbox\n .Send(msgs) 9 10 Router -> ready : schedule(proc) 11 12 ready -> ready : enqueue(proc) 13 14 ready -> System : signal() 15 16 System -> ready : fetchProc() 17 18 ready -> System : return proc 19 20 System -> Actor : poll proc.Actor 21 22 Actor -> Mailbox : tryReceive 23 24 Mailbox -> Actor : return msgs 25 26 Actor -> Actor : Poll(msgs) 27 28 @enduml 29 30 PlantUML version 1.2021.7(Sun May 23 20:40:07 CST 2021) 31 (GPL source distribution) 32 Java Runtime: OpenJDK Runtime Environment 33 JVM: OpenJDK 64-Bit Server VM 34 Default Encoding: UTF-8 35 Language: en 36 Country: US 37 --></g></svg>