# HG changeset patch # User Nozomi Teruya # Date 1517469953 -32400 # Node ID cad92fc746137dc38730b12edcdd046534b27352 # Parent 2bf8a1edcecc47bec52488ecb8edbd2b6cd42ac9 change SequenceDiagram diff -r 2bf8a1edcecc -r cad92fc74613 ChristieClass.graffle --- a/ChristieClass.graffle Wed Jan 31 23:29:00 2018 +0900 +++ b/ChristieClass.graffle Thu Feb 01 16:25:53 2018 +0900 @@ -26,7 +26,7 @@ MasterSheets ModificationDate - 2018-01-31 14:22:46 +0000 + 2018-02-01 04:44:44 +0000 Modifier Nozomi Teruya NotesVisible @@ -4913,6 +4913,85 @@ GraphicsList + AllowLabelDrop + + Class + LineGraphic + ID + 244 + Points + + {289.25, 197.25} + {580.6875, 197} + + Style + + stroke + + HeadArrow + StickArrow + HeadScale + 1.4285709857940674 + Legacy + + LineType + 1 + TailArrow + 0 + TailScale + 0.5 + + + + + Bounds + {{479, 180.75}, {17, 14}} + Class + ShapedGraphic + FitText + YES + Flow + Resize + ID + 243 + Shape + Rectangle + Style + + fill + + Draws + NO + + shadow + + Draws + NO + + stroke + + Draws + NO + + + Text + + Pad + 0 + Text + {\rtf1\ansi\ansicpg1252\cocoartf1348\cocoasubrtf170 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 put} + VerticalPad + 0 + + Wrap + NO + + Class Group Graphics @@ -5564,7 +5643,7 @@ stroke HeadArrow - FilledArrow + StickArrow HeadScale 1.4285709857940674 Legacy @@ -5760,7 +5839,7 @@ stroke HeadArrow - FilledArrow + StickArrow HeadScale 1.4285709857940674 Legacy @@ -6471,7 +6550,7 @@ stroke HeadArrow - FilledArrow + StickArrow HeadScale 1.4285709857940674 Legacy @@ -7368,6 +7447,86 @@ GraphicsList + Bounds + {{504.77422017317508, 77.528907396380163}, {71, 28}} + Class + ShapedGraphic + FitText + YES + Flow + Resize + ID + 317 + Shape + Rectangle + Style + + fill + + Draws + NO + + shadow + + Draws + NO + + stroke + + Draws + NO + + + Text + + Pad + 0 + Text + {\rtf1\ansi\ansicpg1252\cocoartf1348\cocoasubrtf170 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 create\ +RemoteDGM} + VerticalPad + 0 + + Wrap + NO + + + AllowLabelDrop + + Class + LineGraphic + ID + 316 + Points + + {601.40874593779859, 114.28851156615475} + {472.8077889913634, 114.28822385559262} + + Style + + stroke + + HeadArrow + StickArrow + HeadScale + 1.4285709857940674 + Legacy + + LineType + 1 + TailArrow + 0 + TailScale + 0.5 + + + + Class Group Graphics @@ -7444,7 +7603,7 @@ Bounds - {{531.77422017317497, 290.65390272394239}, {17, 14}} + {{531.77422017317497, 288.73082573032735}, {17, 14}} Class ShapedGraphic FitText @@ -7499,22 +7658,20 @@ 311 Points - {601.40874593779847, 308.17308822679837} - {472.80778899136334, 308.17280051623624} - - Style - - stroke - - HeadArrow - FilledArrow - HeadScale - 1.4285709857940674 - Legacy - - LineType - 1 - Pattern + {601.40874593779847, 306.25001123318333} + {472.80778899136334, 306.2497235226212} + + Style + + stroke + + HeadArrow + StickArrow + HeadScale + 1.4285709857940674 + Legacy + + LineType 1 TailArrow 0 @@ -7614,87 +7771,7 @@ Bounds - {{499.32699867254115, 77.528911102453023}, {71, 28}} - Class - ShapedGraphic - FitText - YES - Flow - Resize - ID - 308 - Shape - Rectangle - Style - - fill - - Draws - NO - - shadow - - Draws - NO - - stroke - - Draws - NO - - - Text - - Pad - 0 - Text - {\rtf1\ansi\ansicpg1252\cocoartf1348\cocoasubrtf170 -\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc - -\f0\fs24 \cf0 create\ -RemoteDGM} - VerticalPad - 0 - - Wrap - NO - - - AllowLabelDrop - - Class - LineGraphic - ID - 307 - Points - - {602.57705181167012, 105.76923464882317} - {472.68276977539062, 105.70191192626953} - - Style - - stroke - - HeadArrow - FilledArrow - HeadScale - 1.4285709857940674 - Legacy - - LineType - 1 - TailArrow - 0 - TailScale - 0.5 - - - - - Bounds - {{602.57705181167012, 73.346188123409661}, {17, 269.30770874023438}} + {{602.57705181167012, 77.528877790157708}, {17, 243.14421081542969}} Class ShapedGraphic HFlip @@ -7808,7 +7885,7 @@ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc \f0\b\fs24 \cf0 \ul \ulc0 Other\ -CodeGear} +StartCodeGear} VerticalPad 0 @@ -7867,7 +7944,7 @@ Bounds - {{156.06719471999162, 409.76450288789556}, {18, 14}} + {{156.06719471999162, 429.95681132085338}, {18, 14}} Class ShapedGraphic FitText @@ -8003,9 +8080,9 @@ -1 Points - {90.038453065432009, 441.84051783550495} - {113.03845306543201, 444.84051783550495} - {90.538453065432009, 460.34051783550495} + {90.038453065432009, 462.03282626846277} + {113.03845306543201, 465.03282626846277} + {90.538453065432009, 480.53282626846277} Style @@ -8091,25 +8168,23 @@ stroke HeadArrow - FilledArrow + StickArrow HeadScale 1.4285709857940674 Legacy LineType 1 - Pattern - 1 - TailArrow - 0 - TailScale - 0.5 - - - - - Bounds - {{132.35670115789608, 425.31931115889677}, {26.363507779349362, 51.542427062988281}} + TailArrow + 0 + TailScale + 0.5 + + + + + Bounds + {{132.35670115789608, 445.51161959185458}, {26.363507779349362, 51.542427062988281}} Class ShapedGraphic ID @@ -8163,8 +8238,8 @@ 209 Points - {253.538459966874, 426.28485024751274} - {90.038459966873802, 425.31933300613321} + {253.538459966874, 446.47715868047055} + {90.038459966873802, 445.51164143909102} Style @@ -8211,7 +8286,7 @@ stroke HeadArrow - FilledArrow + StickArrow HeadScale 1.4285709857940674 Legacy @@ -8325,7 +8400,7 @@ Bounds - {{255.18187389859995, 384.96155026305922}, {12.569834105263308, 9.2758620689655107}} + {{250.24146858733781, 384.96153155354921}, {13.061450684845019, 9.2758620689655107}} Class ShapedGraphic ID @@ -8374,7 +8449,7 @@ Bounds - {{248.24997982611956, 383.47078671626133}, {133.24999999999994, 66.918719211822605}} + {{243.03846242018707, 383.47076800675131}, {138.4615174059324, 66.918719211822605}} Class ShapedGraphic ID @@ -8406,7 +8481,7 @@ Bounds - {{248.24997994893886, 383.13950592808391}, {29.53479381443298, 11.097906403940877}} + {{243.03846254780998, 383.13948721857389}, {30.689923961108729, 11.097906403940877}} Class ShapedGraphic ID @@ -8707,7 +8782,7 @@ Bounds - {{455.68276030072047, 106.70191181764073}, {17, 491.7115478515625}} + {{455.68276030072047, 115.86539448365636}, {17, 482.54806518554688}} Class ShapedGraphic HFlip @@ -8854,7 +8929,7 @@ stroke HeadArrow - FilledArrow + StickArrow HeadScale 1.4285709857940674 Legacy @@ -8869,54 +8944,6 @@ - Bounds - {{155.28846242018713, 325.27891578335732}, {22, 14}} - Class - ShapedGraphic - FitText - YES - Flow - Resize - ID - 283 - Shape - Rectangle - Style - - fill - - Draws - NO - - shadow - - Draws - NO - - stroke - - Draws - NO - - - Text - - Pad - 0 - Text - {\rtf1\ansi\ansicpg1252\cocoartf1348\cocoasubrtf170 -\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc - -\f0\fs24 \cf0 wait} - VerticalPad - 0 - - Wrap - NO - - AllowLabelDrop Class @@ -9019,7 +9046,7 @@ stroke HeadArrow - FilledArrow + StickArrow HeadScale 1.4285709857940674 Legacy @@ -9507,39 +9534,6 @@ - AllowLabelDrop - - Class - LineGraphic - ID - 285 - Points - - {253.03846242018707, 346.01104640960682} - {90.038462420186988, 345.01104640960682} - - Style - - stroke - - HeadArrow - StickArrow - HeadScale - 1.4285709857940674 - Legacy - - LineType - 1 - Pattern - 1 - TailArrow - 0 - TailScale - 0.5 - - - - Bounds {{253.0384624201871, 77.528906211345031}, {17, 520.88458251953125}} Class @@ -9880,6 +9874,285 @@ GraphicsList + Bounds + {{649.25001009626158, 120.23528678011138}, {20, 18}} + Class + ShapedGraphic + FitText + YES + Flow + Resize + ID + 299 + Shape + Rectangle + Style + + fill + + Draws + NO + + shadow + + Draws + NO + + stroke + + Draws + NO + + + Text + + Pad + 0 + Text + {\rtf1\ansi\ansicpg1252\cocoartf1348\cocoasubrtf170 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset128 HiraKakuProN-W3;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 put} + VerticalPad + 0 + + Wrap + NO + + + AllowLabelDrop + + Class + LineGraphic + ID + 298 + Points + + {725.51957935463827, 137.2352967025775} + {590.28921564960888, 138.2352967025775} + + Style + + stroke + + HeadArrow + StickArrow + HeadScale + 1.4285709857940674 + Legacy + + LineType + 1 + TailArrow + 0 + TailScale + 0.5 + + + + + Class + Group + Graphics + + + AllowLabelDrop + + Class + LineGraphic + ID + 296 + Points + + {729.29412572791955, 707.15385915565457} + {747.29412572791955, 689.15385915565457} + + Style + + stroke + + HeadArrow + 0 + HeadScale + 1.4285709857940674 + Legacy + + LineType + 1 + TailArrow + 0 + TailScale + 0.5 + Width + 2 + + + + + AllowLabelDrop + + Class + LineGraphic + ID + 297 + Points + + {729.29412572791955, 689.15385915565457} + {747.29412572791955, 707.15385915565457} + + Style + + stroke + + HeadArrow + 0 + HeadScale + 1.4285709857940674 + Legacy + + LineType + 1 + TailArrow + 0 + TailScale + 0.5 + Width + 2 + + + + + ID + 295 + + + Bounds + {{726.49997152983372, 115.9999994632152}, {17, 54.588237762451172}} + Class + ShapedGraphic + HFlip + YES + ID + 294 + Magnets + + {0.5, 0.50238099999999997} + {0.45588200000000001, -0.497222} + {-1, -1} + {-1, 1} + {0, 1} + {0, -1} + {1, 0} + {-1, 0} + + Shape + Rectangle + Style + + shadow + + Draws + NO + + + Text + + Align + 0 + VerticalPad + 0 + + + + Class + Group + Graphics + + + AllowLabelDrop + + Class + LineGraphic + ID + 292 + Points + + {735.00000148569359, 55.500000561719155} + {737.50000148569359, 714.00000056171871} + + Style + + stroke + + HeadArrow + 0 + HeadScale + 1.4285709857940674 + Legacy + + Pattern + 1 + TailArrow + 0 + TailScale + 0.5 + + + Tail + + ID + 293 + + + + Bounds + {{675.50000148569359, 20.500000561719162}, {119, 35}} + Class + ShapedGraphic + ID + 293 + Magnets + + {1, 1} + {1, -1} + {-1, -1} + {-1, 1} + {0, 1} + {0, -1} + {1, 0} + {-1, 0} + + Shape + Rectangle + Style + + shadow + + Draws + NO + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1348\cocoasubrtf170 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 \ul \ulc0 Other\ +StartCodeGear} + VerticalPad + 0 + + + + ID + 291 + + Class Group Graphics @@ -10659,7 +10932,7 @@ stroke HeadArrow - FilledArrow + StickArrow HeadScale 1.4285709857940674 Legacy @@ -10746,7 +11019,7 @@ stroke HeadArrow - FilledArrow + StickArrow HeadScale 1.4285709857940674 Legacy @@ -11392,7 +11665,7 @@ Bounds - {{574, 70.499999999999886}, {17, 644}} + {{574, 96.078430175781136}, {17, 618.42156982421875}} Class ShapedGraphic HFlip @@ -11532,7 +11805,7 @@ stroke HeadArrow - FilledArrow + StickArrow HeadScale 1.4285709857940674 Legacy @@ -11796,7 +12069,7 @@ stroke HeadArrow - FilledArrow + StickArrow HeadScale 1.4285709857940674 Legacy @@ -12006,7 +12279,7 @@ stroke HeadArrow - FilledArrow + StickArrow HeadScale 1.4285709857940674 Legacy @@ -16399,7 +16672,7 @@ WindowInfo CurrentSheet - 4 + 5 ExpandedCanvases @@ -16422,9 +16695,9 @@ SidebarWidth 120 VisibleRegion - {{0, 0}, {927, 619}} + {{0, 0}, {891.34618654053713, 595.1923295238322}} Zoom - 1 + 1.0399999618530273 ZoomValues diff -r 2bf8a1edcecc -r cad92fc74613 paper/images/LocalSequence.pdf Binary file paper/images/LocalSequence.pdf has changed diff -r 2bf8a1edcecc -r cad92fc74613 paper/images/RemotePutSequence.pdf Binary file paper/images/RemotePutSequence.pdf has changed diff -r 2bf8a1edcecc -r cad92fc74613 paper/images/RemoteTakeSequence.pdf Binary file paper/images/RemoteTakeSequence.pdf has changed diff -r 2bf8a1edcecc -r cad92fc74613 paper/images/compress.pdf Binary file paper/images/compress.pdf has changed diff -r 2bf8a1edcecc -r cad92fc74613 paper/nozomi-master.pdf Binary file paper/nozomi-master.pdf has changed diff -r 2bf8a1edcecc -r cad92fc74613 paper/nozomi-master.tex --- a/paper/nozomi-master.tex Wed Jan 31 23:29:00 2018 +0900 +++ b/paper/nozomi-master.tex Thu Feb 01 16:25:53 2018 +0900 @@ -296,6 +296,8 @@ このようにプログラムすることで、通常処理と例外処理を分離することができるため、仕様の変更を抑えたシンプルなプログラムを記述できる。 仕様の変更を抑えてプログラムの拡張ができるということは、コードを破壊しないため変更以前の信頼性を保てるということである。 +Meta ComputationもCS/DSで作られており、プログラマ側から見えないこれらのCS/DSはMeta CS/Meta DSと呼ばれる。 + 現在Aliceには、データの圧縮機能、トポロジーの構成・管理機能、ノードの生存確認機能、ノードの切断・再接続時の処理管理機能などのMeta Computationが用意されている。 \newpage @@ -304,7 +306,7 @@ リモートノードに大きなデータを送るために、データを圧縮したい場合がある。 そこで、Aliceは圧縮をサポートしている。 しかし、単に圧縮のメソッドを用意したわけではない。 -圧縮データの展開と、圧縮したまま別ノードへの転送を同時に実現したい場合があるため、Meta Computationを介すことでDSに圧縮と非圧縮のデータを同時に持てるようにしている(図\ref{fig:compress})。 +圧縮データの展開と、圧縮したまま別ノードへの転送を同時に実現したい場合があるため、Meta CSを介すことでDSに圧縮と非圧縮のデータを同時に持てるようにしている(図\ref{fig:compress})。 \begin{figure}[h] \begin{center} @@ -314,7 +316,7 @@ \label{fig:compress} \end{figure} -1つのDS内に以下の3つの表現を持たせることでデータに多態性を持たせ、必要に応じた形式でDSを扱う。 +1つのDS内にMeta DSとして以下の3つの表現を持たせることでデータに多態性を持たせ、必要に応じた形式でDSを扱う。 \begin{enumerate} \item 一般的なJavaのクラスオブジェクト @@ -612,13 +614,12 @@ \newpage -なお、圧縮を指定する際はAlice同様DGM名の前にcompressedをつける。 -LocalからのTAKEではDGM名の指定がないが、それはLocalでの圧縮は基本想定していないためである。 -しかし、Localでの圧縮をしようと思えばRemoteTakeを用いて間接的にすることは可能である(\ref{src:compresslocal})。 - +なお、圧縮のMeta ComputationはAliceと同様で、指定する際にDGM名の前にcompressedをつける(\ref{src:compresslocal})。 \lstinputlisting[label=src:compresslocal, caption=Localへの圧縮の指定の例]{source/christie/CompressLocal.java} +LocalからのTAKEではDGM名の指定がないが、それはLocalでの圧縮は基本想定していないためである。 +しかし、Localでの圧縮をしようと思えばRemoteTakeを用いて間接的にすることは可能である。 \subsection{PUT/FLIP} @@ -779,23 +780,26 @@ \section{通信フロー} いくつか例をあげてChristieの通信のフローをシーケンス図を用いて解説する。 -図\ref{fig:localSequence}はLocalDGMにTakeを行ったときのフローである。 +図\ref{fig:localSequence}はLocalDGMにTakeを行い、LocalDGM内にDGがあったときの処理の流れである。 \begin{figure}[h] \begin{center} \includegraphics[width=160mm]{images/LocalSequence.pdf} \end{center} -\caption{LocalDGMにTakeしたといのフロー} +\caption{LocalDGMにTakeしたときのフロー} \label{fig:localSequence} \end{figure} -CGがsetupされるとアノテーションからTAKEコマンドが作られ実行される。 -このとき要求したデータがDGM内にない場合はwaitListに入る。 -PUTコマンドが実行された際、もしwaitListにPutしたDGを待っているコマンドがあれば実行される。 -CGは生成したインプットコマンドの総数を初期値としたカウンタを持っており、コマンドが解決されるたびにカウンタは減っていき、0になるとCGがThreadPoolへ送られる。 +プログラマはmainでCGMとStartCGを生成する。 +CGMと同時にLocalDGMは作られる。 +CGが生成され、setupメソッドが呼ばれるとアノテーションからTAKEコマンドが作られ実行される。 +CGは生成したインプットコマンドの総数を初期値としたカウンタを持っており、コマンドが解決される(InputDGが揃う)たびにカウンタは減っていき、0になるとrun内の処理がThreadPoolへ送られる。 \newpage +図\ref{fig:remotePutSequence}は、LocalDGMにTakeを行うが、LocalDGM内にDGがなかったためにPutの待ち合わせをするときの処理の流れである。 +mainなどの最初の処理は図\ref{fig:localSequence}と同様のため省略する。 + \begin{figure}[h] \begin{center} \includegraphics[width=160mm]{images/RemotePutSequence.pdf} @@ -804,21 +808,31 @@ \label{fig:remotePutSequence} \end{figure} +図\ref{fig:localSequence}と同様に、setupメソッドからTAKEコマンドを生成し実行する。 +このとき要求したデータがDGM内にない場合はwaitListに入る。 +LocalまたはリモードノードからPUTコマンドが実行された際、もしwaitListにPutしたDGを待っているコマンドがあれば実行される。 -リモートから来たコマンドを含むLocalDGMへの操作はLocalDGMのwaitListに入り、リモートからの応答を待つコマンドはRemoteDGMのwaitListに入る。 - \newpage +図\ref{fig:remoteTakeSequence}は、RemoteDGMにTakeを行ったときの処理の流れである。 \begin{figure}[h] \begin{center} -\includegraphics[width=180mm]{images/RemoteTakeSequence.pdf} +\includegraphics[width=165mm]{images/RemoteTakeSequence.pdf} \end{center} \caption{RemoteDGMにTakeしたときのフロー} \label{fig:remoteTakeSequence} \end{figure} +StartCGで事前にRemoteDGMを生成しておく。 +RemoteTakeアノテーションからRemoteDGMに対するTakeコマンドを生成し実行する。 +RemoteTakeのようにリモートからの応答を待つコマンドはRemoteDGMのwaitListに入る。 +そして、MessagePack形式に変換したRemoteCommandを作成し、それをRemoteDGMが参照している別ノードのLocalDGMに送る。 +それを受け取った側のLocalDGMは、DGがあればREPLYコマンドを生成して送り返す。 +もしDGがなければ、リモートから来たコマンドもローカルの場合と同様にLocalDGMのwaitListに入る。 + +REPLYを受け取るとRemoteDGMはwaitListに入っていたコマンドを解決する。 \chapter{謝辞}