Mercurial > hg > Papers > 2014 > nobuyasu-master
annotate paper/chapter3.tex @ 24:5316b4791570
Added master_paper.pdf
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 24 Jan 2014 11:14:24 +0900 |
parents | 21e1a110f258 |
children | 67880a2ca650 |
rev | line source |
---|---|
4
d42d2acf5d1d
Added some tex files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 \chapter{Jungleの分散実装} |
10
02c7fc1cda10
Writed description of TreeOperationLog
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
2 \section{TreeOperationLogを用いての分散データベースの実装} |
12 | 3 Jungle でデータ扱うと TreeOperationLog として残ることは述べた. |
10
02c7fc1cda10
Writed description of TreeOperationLog
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
4 この TreeOperationLog を他のサーバへと送り, Jungle の編集を行って |
02c7fc1cda10
Writed description of TreeOperationLog
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
5 貰うことでデータの分散を行うことができる. |
12 | 6 ここで問題になることはネットワークトポロジーの形成方法であった. |
7 | |
24
5316b4791570
Added master_paper.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
23
diff
changeset
|
8 % なぜツリー型なのか説明をしたほうがいい? |
5316b4791570
Added master_paper.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
23
diff
changeset
|
9 % マージの利用のためツリー型? |
12 | 10 Jungle で使用するネットワークトポロジーはツリー型を考えている. |
11 しかし, リング型といった他のネットワークトポロジーによる実装に関しても試す余地はある. | |
12 自由にネットワークトポロジーの形成を行うことができる必要があった. | |
13 | |
24
5316b4791570
Added master_paper.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
23
diff
changeset
|
14 そこで当研究室で開発を行っている並列分散フレームワークである Alice を使用する. |
12 | 15 Alice により提供されるネットワークトポロジー形成を用いて TreeOperationLog を各サーバノードへ |
16 配ることで並列分散フレームワークの実装を行う. | |
11 | 17 |
12 | 18 % トポロジー形成の説明をする. 重要さなども。 |
19 % トポロジーの形成は容易ではない. | |
20 % Alice が必要な機能を提供してくれることを述べる | |
21 % Alice はトポロジー形成の機能を提供している | |
22 % トポロジー間でのデータの受け渡す機能も提供している | |
23 \begin{figure}[htpb] | |
24 \begin{minipage}{0.5\hsize} | |
25 \begin{center} | |
26 \includegraphics[scale=0.7]{figures/network_topology_ring.pdf} | |
27 \caption{リング型のNetwork Topology} | |
28 \label{fig:topology_ring} | |
29 \end{center} | |
30 \end{minipage} | |
31 \begin{minipage}{0.5\hsize} | |
32 \begin{center} | |
33 \includegraphics[scale=0.7]{figures/network_topology_tree.pdf} | |
34 \caption{ツリー型のNetwork Topology} | |
35 \label{fig:topology_tree} | |
36 \end{center} | |
37 \end{minipage} | |
38 \end{figure} | |
11 | 39 |
40 \section{並列分散フレームワークAlice} | |
15
7df3a9a13b22
Writed research
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
12
diff
changeset
|
41 Alice は当研究室で開発している並列分散フレームワークである. |
16
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
42 Alice はデータを DataSegment, コードを CodeSegment という単位で扱うプログラミングを提供している. |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
43 DataSegment として扱われるデータは |
15
7df3a9a13b22
Writed research
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
12
diff
changeset
|
44 |
16
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
45 % DataSegment, CodeSegment はなしにしたほうがいいかもしれない. Alice が論文の主題じゃないから |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
46 % それとこの2つの説明をするとしたら結構な量になる |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
47 |
20 | 48 \section{Alice のトポロジーマネージャーの利用} |
49 Alice はサーバノード同士によるネットワークトポロジー形成の機能を持つ. | |
50 トポロジーマネージャーの起動は\ref{src:alice_dot}の様にポート番号の指定と dot ファイルを引数として渡すことで行う. | |
51 (\ref{src:alice_ntm_run}). | |
52 \begin{lstlisting}[frame=lrbt,label=src:alice_ntm_run,caption=Alice によるネットワークトポロジーマネージャーの起動,numbers=left] | |
53 % java -cp Alice.jar alice.topology.manager.TopologyManager -p 10000 -conf ./topology/tree5.dot | |
54 \end{lstlisting} | |
55 | |
56 | |
57 ポート番号は Alice により記述された並列分散プログラムの起動時に渡す必要がある. | |
58 dot ファイルには, トポロジーをどのように形成するかが書かれている. | |
59 以下に, サーバノード数5で, 2分木ツリー構造を形成する dot ファイルの例を示す(\ref{src:alice_dot}). | |
18
fc14b1876141
Modified description of topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
17
diff
changeset
|
60 \begin{lstlisting}[frame=lrbt,label=src:alice_dot,caption=ネットワークトポロジー設定用 dot ファイル,numbers=left] |
fc14b1876141
Modified description of topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
17
diff
changeset
|
61 % cat tree5.dot |
16
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
62 digraph test { |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
63 node0 -> node1 [label="child1"] |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
64 node0 -> node2 [label="child2"] |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
65 node1 -> node0 [label="parent"] |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
66 node1 -> node3 [label="child1"] |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
67 node1 -> node4 [label="child2"] |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
68 node2 -> node0 [label="parent"] |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
69 node3 -> node1 [label="parent"] |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
70 node4 -> node1 [label="parent"] |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
71 } |
18
fc14b1876141
Modified description of topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
17
diff
changeset
|
72 \end{lstlisting} |
fc14b1876141
Modified description of topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
17
diff
changeset
|
73 |
20 | 74 node0 や node1 はサーバノードの名前を示す. |
75 サーバノードの間にはラベルがあり, Alice 上ではこのラベル | |
76 に指定される文字列(キー)を使うことで他のサーバノードのデータへアクセスすることができる. | |
77 node0 -> node1 はサーバノード同士の繋がりを示している. | |
78 次に続く label="child1" は, node0 が node1 のデータに"child1"という文字列を使うことでアクセス | |
79 できることを示す. | |
18
fc14b1876141
Modified description of topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
17
diff
changeset
|
80 |
21 | 81 dot ファイルを読み込んだ Alice のトポロジーマネージャーに対して, サーバノードは |
20 | 82 誰に接続を行えばよいかを訪ねる. |
83 トポロジーマネージャーは訪ねてきたサーバノードに対してノード番号を割り振り, dot ファイル | |
84 に記述している通りにサーバノード同士が接続を行うよう指示をだす. | |
18
fc14b1876141
Modified description of topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
17
diff
changeset
|
85 |
20 | 86 トポロジーマネージャーは接続要求先を聞いてくるサーバノードに対して名前を割り振り, 接続相手を伝える. |
87 dot ファイル\ref{src:alice_dot}により形成されるトポロジーを図\ref{fig:tree_topology}に示す. | |
16
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
88 |
20 | 89 \newpage |
16
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
90 |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
91 \begin{figure}[htpb] |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
92 \begin{center} |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
93 \includegraphics[scale=0.70]{figures/tree_topology.pdf} |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
94 \caption{Alice によるネットワークトポロジー形成} |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
95 \label{fig:tree_topology} |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
96 \end{center} |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
97 \end{figure} |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
98 |
19 | 99 |
17
dfa2fd4658b2
Modified abstract
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
16
diff
changeset
|
100 矢印に書かれている文字列は, 相手のデータにアクセスするキーを示す. |
dfa2fd4658b2
Modified abstract
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
16
diff
changeset
|
101 "child1", "child2", "parent" というキーを使うことで別のサーバノードにあるデータを取得することができる. |
dfa2fd4658b2
Modified abstract
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
16
diff
changeset
|
102 %子共となるノードは "parent" キーにより親の DSM (Remote DSM) にアクセスすることができる. |
dfa2fd4658b2
Modified abstract
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
16
diff
changeset
|
103 %また, 親も子供となるノードの DSM に対して "child1" や "child2" キーによりアクセスすることが可能となる. |
16
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
104 |
20 | 105 トポロジーマネージャーに最初に接続要求を行う並列分散プログラム側は, 次のように記述する(\ref{src:alice_start}) |
106 \begin{lstlisting}[frame=lrbt,label=src:alice_start,caption=Alice を使用してのトポロジー形成,numbers=left] | |
107 public static void main( String[] args ) throws Exception | |
108 { | |
109 RemoteConfig conf = new RemoteConfig(args); | |
110 new TopologyNode(conf, new StartBBSCodeSegment(args, conf.bbsPort)); | |
111 } | |
112 \end{lstlisting} | |
113 | |
114 | |
21 | 115 そして, プログラムの起動時にはトポロジーマネージャーが動いているサーバのドメインとポート番号を |
116 渡すことでトポロジーの形成が行われれプログラムの処理がはしる. | |
117 例えば, mass00.cs.ie.u-ryukyu.ac.jp というサーバ上でポート番号10000を指定してトポロジーマネージャーを | |
118 起動した場合は次のようになる(\ref{src:run_program}). | |
119 \begin{lstlisting}[frame=lrbt,label=src:run_program,caption=トポロジーマネージャーの利用,numbers=left] | |
120 % java Program -host mass00.cs.ie.u-ryukyu.ac.jp -port 10000 | |
121 \end{lstlisting} | |
17
dfa2fd4658b2
Modified abstract
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
16
diff
changeset
|
122 |
dfa2fd4658b2
Modified abstract
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
16
diff
changeset
|
123 % MessagePackの説明もここに簡単に入れたほうがいいかも. |
dfa2fd4658b2
Modified abstract
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
16
diff
changeset
|
124 |
dfa2fd4658b2
Modified abstract
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
16
diff
changeset
|
125 \section{Aliceを用いての分散実装} |
21 | 126 形成されたトポロジー上でのデータの送受信を行う部分について述べる. |
10
02c7fc1cda10
Writed description of TreeOperationLog
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
127 |
11 | 128 |
4
d42d2acf5d1d
Added some tex files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
129 \section{ログのシリアライズ} |
21 | 130 ここでログのシリアライズについて述べる. |
17
dfa2fd4658b2
Modified abstract
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
16
diff
changeset
|
131 |
16
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
132 シリアライズとは, データをネットワーク上に流しても良い形式に変換することである. |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
133 |
e16dad3b80fc
Writed topology manager
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
134 |
4
d42d2acf5d1d
Added some tex files
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
135 \section{Jungleの永続性の実装} |
21 | 136 |
137 | |
22
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
138 \section{掲示板プログラムにおけるマージの実装} |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
139 Jungle に分散実装を行った後の問題としてデータ衝突がある. |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
140 他のサーバノードから送られてくるデータが既に手元で変更を加えた木構造を対象とした |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
141 場合に発生する問題である. |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
142 Jungle ではこれをアプリケーション毎にマージを実装することで解決させる. |
21 | 143 |
22
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
144 今回分散実装を行い, 例題として掲示板プログラムを用意した. |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
145 掲示板プログラムに実装を行ったマージについて述べる. |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
146 まず Jungle を用いた掲示板プログラムのデータ保持方法を図\ref{fig:merge2}に示す. |
21 | 147 \begin{figure}[htpb] |
148 \begin{center} | |
22
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
149 \includegraphics[scale=0.70]{figures/merge2.pdf} |
21 | 150 \caption{Jungle による掲示板プログラムのデータ保持方法} |
22
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
151 \label{fig:merge2} |
21 | 152 \end{center} |
153 \end{figure} | |
154 | |
155 掲示板プログラムでは各掲示板毎に1つの木構造が作成される. | |
22
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
156 掲示板への1つの書き込みは子ノードを1つ追加することに相当する. |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
157 また, 各子ノードは attributes として書き込みの内容である message と書き込まれた時間を表す timestamp を保持している. |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
158 先に追加された順で子ノードには若い番号が割り振られる. |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
159 |
23
21e1a110f258
Writed description of merge
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
22
diff
changeset
|
160 他サーバノードからの書き込みをそのまま子ノードの後ろに追加してしまうと, データの整合性が崩れてしまう. |
22
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
161 この時の状態を表しているのが図\ref{fig:merge_imp1}と\ref{fig:merge_imp2}になる. |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
162 \begin{figure}[htpb] |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
163 \begin{center} |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
164 \includegraphics[scale=0.70]{figures/merge_imp1.pdf} |
23
21e1a110f258
Writed description of merge
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
22
diff
changeset
|
165 \caption{他サーバノードの編集データ反映による整合性の崩れ1} |
22
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
166 \label{fig:merge_imp1} |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
167 \end{center} |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
168 \end{figure} |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
169 |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
170 \begin{figure}[htpb] |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
171 \begin{center} |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
172 \includegraphics[scale=0.70]{figures/merge_imp2.pdf} |
23
21e1a110f258
Writed description of merge
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
22
diff
changeset
|
173 \caption{他サーバノードの編集データ反映による整合性の崩れ2} |
22
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
174 \label{fig:merge_imp2} |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
175 \end{center} |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
176 \end{figure} |
21 | 177 |
23
21e1a110f258
Writed description of merge
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
22
diff
changeset
|
178 \newpage |
21e1a110f258
Writed description of merge
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
22
diff
changeset
|
179 |
21e1a110f258
Writed description of merge
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
22
diff
changeset
|
180 図\ref{fig:merge_imp2}の server node0 の木の状態にするのが理想である. |
21e1a110f258
Writed description of merge
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
22
diff
changeset
|
181 掲示板のへの書き込みの表示は, 書き込みされた時間が早い順に表示されるようにしたい. |
21e1a110f258
Writed description of merge
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
22
diff
changeset
|
182 これを timestamp を利用することで行う. |
21e1a110f258
Writed description of merge
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
22
diff
changeset
|
183 他サーバノードから来たデータに関しては, timestamp を参照し, 次に自分の保持している |
21e1a110f258
Writed description of merge
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
22
diff
changeset
|
184 木の子ノードの timestamp と比べていくことでデータの追加する場所を決める. |
21e1a110f258
Writed description of merge
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
22
diff
changeset
|
185 これが今回実装を行った掲示板システムにおけるマージになる. |
21e1a110f258
Writed description of merge
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
22
diff
changeset
|
186 |
21e1a110f258
Writed description of merge
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
22
diff
changeset
|
187 %単一サーバで動いている時の Jungle はただ子ノードとして後ろに追加するだけだが, 分散 |
21e1a110f258
Writed description of merge
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
22
diff
changeset
|
188 %環境下においては timestamp に従い子ノードを追加する位置を決めるようにする. |
21 | 189 |
190 | |
22
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
191 |
56753cfbeeab
Added merge_imp.pdf
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
192 |