annotate slide/slide.html @ 13:117794d50054

update
author akahori
date Tue, 19 Feb 2019 21:49:55 +0900
parents 2e843f65ac5f
children 22e7e5667b99
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
9627f1774b45 add slide
akahori
parents:
diff changeset
1 <!DOCTYPE html>
9627f1774b45 add slide
akahori
parents:
diff changeset
2 <html>
9627f1774b45 add slide
akahori
parents:
diff changeset
3 <head>
9627f1774b45 add slide
akahori
parents:
diff changeset
4 <meta http-equiv="content-type" content="text/html;charset=utf-8">
9627f1774b45 add slide
akahori
parents:
diff changeset
5 <title>Christieによるブロックチェーンの実装</title>
9627f1774b45 add slide
akahori
parents:
diff changeset
6
9627f1774b45 add slide
akahori
parents:
diff changeset
7 <meta name="generator" content="Slide Show (S9) v2.5.0 on Ruby 2.3.7 (2018-03-28) [universal.x86_64-darwin17]">
9627f1774b45 add slide
akahori
parents:
diff changeset
8 <meta name="author" content="赤堀 貴一" >
9627f1774b45 add slide
akahori
parents:
diff changeset
9
9627f1774b45 add slide
akahori
parents:
diff changeset
10 <!-- style sheet links -->
9627f1774b45 add slide
akahori
parents:
diff changeset
11 <link rel="stylesheet" href="s6/themes/projection.css" media="screen,projection">
9627f1774b45 add slide
akahori
parents:
diff changeset
12 <link rel="stylesheet" href="s6/themes/screen.css" media="screen">
9627f1774b45 add slide
akahori
parents:
diff changeset
13 <link rel="stylesheet" href="s6/themes/print.css" media="print">
9627f1774b45 add slide
akahori
parents:
diff changeset
14 <link rel="stylesheet" href="s6/themes/blank.css" media="screen,projection">
9627f1774b45 add slide
akahori
parents:
diff changeset
15
9627f1774b45 add slide
akahori
parents:
diff changeset
16 <!-- JS -->
9627f1774b45 add slide
akahori
parents:
diff changeset
17 <script src="s6/js/jquery-1.11.3.min.js"></script>
9627f1774b45 add slide
akahori
parents:
diff changeset
18 <script src="s6/js/jquery.slideshow.js"></script>
9627f1774b45 add slide
akahori
parents:
diff changeset
19 <script src="s6/js/jquery.slideshow.counter.js"></script>
9627f1774b45 add slide
akahori
parents:
diff changeset
20 <script src="s6/js/jquery.slideshow.controls.js"></script>
9627f1774b45 add slide
akahori
parents:
diff changeset
21 <script src="s6/js/jquery.slideshow.footer.js"></script>
9627f1774b45 add slide
akahori
parents:
diff changeset
22 <script src="s6/js/jquery.slideshow.autoplay.js"></script>
9627f1774b45 add slide
akahori
parents:
diff changeset
23
9627f1774b45 add slide
akahori
parents:
diff changeset
24 <!-- prettify -->
9627f1774b45 add slide
akahori
parents:
diff changeset
25 <link rel="stylesheet" href="scripts/prettify.css">
9627f1774b45 add slide
akahori
parents:
diff changeset
26 <script src="scripts/prettify.js"></script>
9627f1774b45 add slide
akahori
parents:
diff changeset
27
9627f1774b45 add slide
akahori
parents:
diff changeset
28 <script>
9627f1774b45 add slide
akahori
parents:
diff changeset
29 $(document).ready( function() {
9627f1774b45 add slide
akahori
parents:
diff changeset
30 Slideshow.init();
9627f1774b45 add slide
akahori
parents:
diff changeset
31
9627f1774b45 add slide
akahori
parents:
diff changeset
32 $('code').each(function(_, el) {
9627f1774b45 add slide
akahori
parents:
diff changeset
33 if (!el.classList.contains('noprettyprint')) {
9627f1774b45 add slide
akahori
parents:
diff changeset
34 el.classList.add('prettyprint');
9627f1774b45 add slide
akahori
parents:
diff changeset
35 }
9627f1774b45 add slide
akahori
parents:
diff changeset
36 });
9627f1774b45 add slide
akahori
parents:
diff changeset
37 prettyPrint();
9627f1774b45 add slide
akahori
parents:
diff changeset
38 } );
9627f1774b45 add slide
akahori
parents:
diff changeset
39
9627f1774b45 add slide
akahori
parents:
diff changeset
40
9627f1774b45 add slide
akahori
parents:
diff changeset
41 </script>
9627f1774b45 add slide
akahori
parents:
diff changeset
42
9627f1774b45 add slide
akahori
parents:
diff changeset
43 <!-- Better Browser Banner for Microsoft Internet Explorer (IE) -->
9627f1774b45 add slide
akahori
parents:
diff changeset
44 <!--[if IE]>
9627f1774b45 add slide
akahori
parents:
diff changeset
45 <script src="s6/js/jquery.microsoft.js"></script>
9627f1774b45 add slide
akahori
parents:
diff changeset
46 <![endif]-->
9627f1774b45 add slide
akahori
parents:
diff changeset
47
9627f1774b45 add slide
akahori
parents:
diff changeset
48
9627f1774b45 add slide
akahori
parents:
diff changeset
49
9627f1774b45 add slide
akahori
parents:
diff changeset
50 </head>
9627f1774b45 add slide
akahori
parents:
diff changeset
51 <body>
9627f1774b45 add slide
akahori
parents:
diff changeset
52
9627f1774b45 add slide
akahori
parents:
diff changeset
53 <div class="layout">
9627f1774b45 add slide
akahori
parents:
diff changeset
54 <div id="header"></div>
9627f1774b45 add slide
akahori
parents:
diff changeset
55 <div id="footer">
9627f1774b45 add slide
akahori
parents:
diff changeset
56 <div align="right">
9627f1774b45 add slide
akahori
parents:
diff changeset
57 <img src="s6/images/logo.svg" width="200px">
9627f1774b45 add slide
akahori
parents:
diff changeset
58 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
59 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
60 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
61
9627f1774b45 add slide
akahori
parents:
diff changeset
62 <div class="presentation">
9627f1774b45 add slide
akahori
parents:
diff changeset
63
9627f1774b45 add slide
akahori
parents:
diff changeset
64 <div class='slide cover'>
9627f1774b45 add slide
akahori
parents:
diff changeset
65 <table width="90%" height="90%" border="0" align="center">
9627f1774b45 add slide
akahori
parents:
diff changeset
66 <tr>
9627f1774b45 add slide
akahori
parents:
diff changeset
67 <td>
9627f1774b45 add slide
akahori
parents:
diff changeset
68 <div align="center">
9627f1774b45 add slide
akahori
parents:
diff changeset
69 <h1><font color="#808db5">Christieによるブロックチェーンの実装</font></h1>
9627f1774b45 add slide
akahori
parents:
diff changeset
70 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
71 </td>
9627f1774b45 add slide
akahori
parents:
diff changeset
72 </tr>
9627f1774b45 add slide
akahori
parents:
diff changeset
73 <tr>
9627f1774b45 add slide
akahori
parents:
diff changeset
74 <td>
9627f1774b45 add slide
akahori
parents:
diff changeset
75 <div align="left">
9627f1774b45 add slide
akahori
parents:
diff changeset
76 赤堀 貴一
9627f1774b45 add slide
akahori
parents:
diff changeset
77 琉球大学 工学部 情報工学科
9627f1774b45 add slide
akahori
parents:
diff changeset
78 <hr style="color:#ffcc00;background-color:#ffcc00;text-align:left;border:none;width:100%;height:0.2em;">
9627f1774b45 add slide
akahori
parents:
diff changeset
79 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
80 </td>
9627f1774b45 add slide
akahori
parents:
diff changeset
81 </tr>
9627f1774b45 add slide
akahori
parents:
diff changeset
82 </table>
9627f1774b45 add slide
akahori
parents:
diff changeset
83 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
84
9627f1774b45 add slide
akahori
parents:
diff changeset
85 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
86 <!-- === begin markdown block ===
9627f1774b45 add slide
akahori
parents:
diff changeset
87
9627f1774b45 add slide
akahori
parents:
diff changeset
88 generated by markdown/1.2.0 on Ruby 2.3.7 (2018-03-28) [universal.x86_64-darwin17]
13
akahori
parents: 12
diff changeset
89 on 2019-02-19 17:49:17 +0900 with Markdown engine kramdown (1.17.0)
10
9627f1774b45 add slide
akahori
parents:
diff changeset
90 using options {}
9627f1774b45 add slide
akahori
parents:
diff changeset
91 -->
9627f1774b45 add slide
akahori
parents:
diff changeset
92
9627f1774b45 add slide
akahori
parents:
diff changeset
93 <!-- _S9SLIDE_ -->
9627f1774b45 add slide
akahori
parents:
diff changeset
94 <h1 id="section">目次</h1>
9627f1774b45 add slide
akahori
parents:
diff changeset
95
9627f1774b45 add slide
akahori
parents:
diff changeset
96 <ul>
13
akahori
parents: 12
diff changeset
97 <li>研究目的</li>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
98 <li>ブロックチェーンとは</li>
9627f1774b45 add slide
akahori
parents:
diff changeset
99 <li>ブロックチェーンのfork</li>
9627f1774b45 add slide
akahori
parents:
diff changeset
100 <li>コンセンサスアルゴリズム
12
akahori
parents: 10
diff changeset
101 <ul>
akahori
parents: 10
diff changeset
102 <li>Proof of Work と Paxos</li>
akahori
parents: 10
diff changeset
103 </ul>
akahori
parents: 10
diff changeset
104 </li>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
105 <li>Christieとは</li>
9627f1774b45 add slide
akahori
parents:
diff changeset
106 <li>TopologyManagerの実装</li>
9627f1774b45 add slide
akahori
parents:
diff changeset
107 <li>PCクラスタ上でPaxosを動かした話</li>
9627f1774b45 add slide
akahori
parents:
diff changeset
108 <li>まとめ</li>
9627f1774b45 add slide
akahori
parents:
diff changeset
109 </ul>
9627f1774b45 add slide
akahori
parents:
diff changeset
110
9627f1774b45 add slide
akahori
parents:
diff changeset
111
9627f1774b45 add slide
akahori
parents:
diff changeset
112 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
113 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
114 <!-- _S9SLIDE_ -->
13
akahori
parents: 12
diff changeset
115 <h1 id="os">研究目的 OS単位での分散システム</h1>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
116
9627f1774b45 add slide
akahori
parents:
diff changeset
117 <ul>
12
akahori
parents: 10
diff changeset
118 <li>コンピュータでデータが壊れることはあり得る. 誤操作や, データの破損, 最悪の場合システムの重要な部分のデータの破損も起こりうる.</li>
akahori
parents: 10
diff changeset
119 <li>ブロックチェーンはデータを分散でき, 破損や不整合の検知が可能である.</li>
akahori
parents: 10
diff changeset
120 <li>当研究室ではGearsOS, そしてGearsOSに組み込む予定がある分散フレームワークChristieがある.</li>
akahori
parents: 10
diff changeset
121 <li>Christieにブロックチェーンを実装し, GearsOSに組み込むことで, GearsOS間の分散システムが可能になる. また, 分散システムを作らずとも, hash chainとしてデータの破損を検知できる.</li>
akahori
parents: 10
diff changeset
122 <li>よって, Christieにブロックチェーンを実装する.</li>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
123 </ul>
9627f1774b45 add slide
akahori
parents:
diff changeset
124
9627f1774b45 add slide
akahori
parents:
diff changeset
125
9627f1774b45 add slide
akahori
parents:
diff changeset
126 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
127 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
128 <!-- _S9SLIDE_ -->
9627f1774b45 add slide
akahori
parents:
diff changeset
129 <h1 id="section-1">ブロックチェーンとは</h1>
9627f1774b45 add slide
akahori
parents:
diff changeset
130
12
akahori
parents: 10
diff changeset
131 <p>ブロックチェーンとは分散型台帳技術と呼ばれる. 複数のトランザクションをまとめたブロックをつなげたものを, 台帳と呼ぶ. その台帳をシステムに参加しているノードが保持する技術である.</p>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
132
9627f1774b45 add slide
akahori
parents:
diff changeset
133 <p>ノード同士はP2Pでつながっており, 対等である. そのため, 管理者がいなくてもデータの管理が行える.</p>
9627f1774b45 add slide
akahori
parents:
diff changeset
134
9627f1774b45 add slide
akahori
parents:
diff changeset
135
9627f1774b45 add slide
akahori
parents:
diff changeset
136 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
137 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
138 <!-- _S9SLIDE_ -->
9627f1774b45 add slide
akahori
parents:
diff changeset
139 <h1 id="section-2">ブロックチェーンとは</h1>
9627f1774b45 add slide
akahori
parents:
diff changeset
140
12
akahori
parents: 10
diff changeset
141 <div style="text-align: center;">
akahori
parents: 10
diff changeset
142 <img src="./images/blockchain.svg" alt="blockchain" width="1000" height="600" />
akahori
parents: 10
diff changeset
143 </div>
akahori
parents: 10
diff changeset
144
akahori
parents: 10
diff changeset
145
akahori
parents: 10
diff changeset
146 </div>
akahori
parents: 10
diff changeset
147 <div class='slide '>
akahori
parents: 10
diff changeset
148 <!-- _S9SLIDE_ -->
akahori
parents: 10
diff changeset
149 <h1 id="section-3">ブロックチェーンとは</h1>
akahori
parents: 10
diff changeset
150
10
9627f1774b45 add slide
akahori
parents:
diff changeset
151 <p>ブロックチェーンにも種類がある. パブリックブロックチェーンとプライベートブロックチェーンである. 以下に, その違いを述べる.</p>
9627f1774b45 add slide
akahori
parents:
diff changeset
152
9627f1774b45 add slide
akahori
parents:
diff changeset
153 <table>
9627f1774b45 add slide
akahori
parents:
diff changeset
154 <thead>
9627f1774b45 add slide
akahori
parents:
diff changeset
155 <tr>
9627f1774b45 add slide
akahori
parents:
diff changeset
156 <th style="text-align: center"> </th>
9627f1774b45 add slide
akahori
parents:
diff changeset
157 <th style="text-align: center">パブリックブロックチェーン</th>
9627f1774b45 add slide
akahori
parents:
diff changeset
158 <th style="text-align: center">プライベートブロックチェーン</th>
9627f1774b45 add slide
akahori
parents:
diff changeset
159 </tr>
9627f1774b45 add slide
akahori
parents:
diff changeset
160 </thead>
9627f1774b45 add slide
akahori
parents:
diff changeset
161 <tbody>
9627f1774b45 add slide
akahori
parents:
diff changeset
162 <tr>
9627f1774b45 add slide
akahori
parents:
diff changeset
163 <td style="text-align: center">ノードの参加権</td>
9627f1774b45 add slide
akahori
parents:
diff changeset
164 <td style="text-align: center">誰でも参加可能</td>
9627f1774b45 add slide
akahori
parents:
diff changeset
165 <td style="text-align: center">管理者(単数 or 複数)によって許可された場合のみ参加可能</td>
9627f1774b45 add slide
akahori
parents:
diff changeset
166 </tr>
9627f1774b45 add slide
akahori
parents:
diff changeset
167 <tr>
9627f1774b45 add slide
akahori
parents:
diff changeset
168 <td style="text-align: center">コンセンサス</td>
9627f1774b45 add slide
akahori
parents:
diff changeset
169 <td style="text-align: center">遅い</td>
9627f1774b45 add slide
akahori
parents:
diff changeset
170 <td style="text-align: center">速い</td>
9627f1774b45 add slide
akahori
parents:
diff changeset
171 </tr>
9627f1774b45 add slide
akahori
parents:
diff changeset
172 </tbody>
9627f1774b45 add slide
akahori
parents:
diff changeset
173 </table>
9627f1774b45 add slide
akahori
parents:
diff changeset
174
9627f1774b45 add slide
akahori
parents:
diff changeset
175 <p>細かい違いは色々あるが, ほとんどはこの2つの違いから生まれる.</p>
9627f1774b45 add slide
akahori
parents:
diff changeset
176
9627f1774b45 add slide
akahori
parents:
diff changeset
177
9627f1774b45 add slide
akahori
parents:
diff changeset
178 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
179 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
180 <!-- _S9SLIDE_ -->
9627f1774b45 add slide
akahori
parents:
diff changeset
181 <h1 id="fork">ブロックチェーンのfork</h1>
9627f1774b45 add slide
akahori
parents:
diff changeset
182
9627f1774b45 add slide
akahori
parents:
diff changeset
183 <p>ブロックがいたるところで作られると, 異なる高さの違うチェーンが複数できる. この状態をforkという.</p>
9627f1774b45 add slide
akahori
parents:
diff changeset
184
9627f1774b45 add slide
akahori
parents:
diff changeset
185 <p>forkが起こった場合, どちらかを正しいものとしてブロックを積み上げたい. そのため, コンセンサスアルゴリズムを用いて, どちらか1方に統合する.</p>
9627f1774b45 add slide
akahori
parents:
diff changeset
186
9627f1774b45 add slide
akahori
parents:
diff changeset
187
9627f1774b45 add slide
akahori
parents:
diff changeset
188 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
189 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
190 <!-- _S9SLIDE_ -->
12
akahori
parents: 10
diff changeset
191 <h1 id="section-4">コンセンサスアルゴリズム</h1>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
192
9627f1774b45 add slide
akahori
parents:
diff changeset
193 <ul>
12
akahori
parents: 10
diff changeset
194 <li>コンセンサスアルゴリズムは分散環境上で値を一意に決めるためのアルゴリズムである.
akahori
parents: 10
diff changeset
195 <ul>
akahori
parents: 10
diff changeset
196 <li>Paxos, Raftなどが有名. 簡単に言えば多数決を安全に行うためのアルゴリズム.</li>
akahori
parents: 10
diff changeset
197 <li>故障モデルというものがあって, コンセンサスアルゴリズムでレベルが4段階ある. Paxos, Raftはレベル3で, ノードに裏切り者がいなければ安全に動く.</li>
akahori
parents: 10
diff changeset
198 <li>PBFTがレベル4である<s>が読んでないのでわからない</s></li>
akahori
parents: 10
diff changeset
199 </ul>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
200 </li>
12
akahori
parents: 10
diff changeset
201 <li>Proof of Workを使っているパブリックブロックチェーンは「ブロックが多ければ多いほど」, レベル4に近づく.</li>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
202 </ul>
9627f1774b45 add slide
akahori
parents:
diff changeset
203
9627f1774b45 add slide
akahori
parents:
diff changeset
204
9627f1774b45 add slide
akahori
parents:
diff changeset
205 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
206 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
207 <!-- _S9SLIDE_ -->
12
akahori
parents: 10
diff changeset
208 <h1 id="section-5">パブリックブロックチェーンのコンセンサスアルゴリズム</h1>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
209
9627f1774b45 add slide
akahori
parents:
diff changeset
210 <ul>
12
akahori
parents: 10
diff changeset
211 <li>パブリックブロックチェーンのコンセンサスアルゴリズムは, 「ある程度ブロックの差がついたら, 長い方を正とする」というもの.</li>
akahori
parents: 10
diff changeset
212 <li>これだけだと, 裏切り者が適当なブロックをガシガシ積めば攻撃できるのでレベル4にはなれない. これを大幅に補強したのがProof of Work.</li>
akahori
parents: 10
diff changeset
213 <li>Proof of Workは, 簡単に言えばブロックのHashに条件をつけるアルゴリズム. つまり, 新しいブロックを作るのが難しくなる.</li>
13
akahori
parents: 12
diff changeset
214 <li>新しいブロックを作るのが難しいので, みんなで協力して作ったチェーンが自然に勝つ. また, 改ざんも難しい. ただし, トランザクションの確定が遅い.</li>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
215 </ul>
9627f1774b45 add slide
akahori
parents:
diff changeset
216
9627f1774b45 add slide
akahori
parents:
diff changeset
217
9627f1774b45 add slide
akahori
parents:
diff changeset
218 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
219 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
220 <!-- _S9SLIDE_ -->
12
akahori
parents: 10
diff changeset
221 <h1 id="section-6">プライベートブロックチェーンのコンセンサスアルゴリズム</h1>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
222
9627f1774b45 add slide
akahori
parents:
diff changeset
223 <ul>
12
akahori
parents: 10
diff changeset
224 <li>プライベートブロックチェーンは管理者が許可するノードしか参加しない. つまり, レベル3のコンセンサスアルゴリズムで十分.</li>
akahori
parents: 10
diff changeset
225 <li>新しいブロックもパブリックブロックチェーンより早く作れる.</li>
akahori
parents: 10
diff changeset
226 <li>コンセンサスアルゴリズムの中でPaxosが速いらしいので, 今回はこちらも実装してみます.</li>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
227 </ul>
9627f1774b45 add slide
akahori
parents:
diff changeset
228
9627f1774b45 add slide
akahori
parents:
diff changeset
229
9627f1774b45 add slide
akahori
parents:
diff changeset
230 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
231 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
232 <!-- _S9SLIDE_ -->
13
akahori
parents: 12
diff changeset
233 <h1 id="paxos">Paxos</h1>
akahori
parents: 12
diff changeset
234
akahori
parents: 12
diff changeset
235 <ul>
akahori
parents: 12
diff changeset
236 <li>Lamport先生が「故障モデルレベル3での合意が不可能なのを証明してやる」と言って証明の途中で逆に編み出してしまったらしいアルゴリズム.</li>
akahori
parents: 12
diff changeset
237 <li>レベル3のアルゴリズムの基礎となっている.</li>
akahori
parents: 12
diff changeset
238 <li>proposerが値を提案し, acceptorが決め, Learnerが集計し, 多数決を取って決まった値を保持.</li>
akahori
parents: 12
diff changeset
239 </ul>
akahori
parents: 12
diff changeset
240
akahori
parents: 12
diff changeset
241
akahori
parents: 12
diff changeset
242 </div>
akahori
parents: 12
diff changeset
243 <div class='slide '>
akahori
parents: 12
diff changeset
244 <!-- _S9SLIDE_ -->
akahori
parents: 12
diff changeset
245 <h1 id="paxos-1">Paxos</h1>
akahori
parents: 12
diff changeset
246
akahori
parents: 12
diff changeset
247 <p>Paxosアルゴリズムに入る前の用語説明</p>
akahori
parents: 12
diff changeset
248 <dl>
akahori
parents: 12
diff changeset
249 <dt>提案</dt>
akahori
parents: 12
diff changeset
250 <dd>提案は, 異なる提案ごとにユニークな提案番号と値からなる. 提案番号とは, 異なる提案を見分けるための識別子であり, 単調増加する. 値は一意に決まってほしいデータである.</dd>
akahori
parents: 12
diff changeset
251 <dt>値(提案)がacceptされる</dt>
akahori
parents: 12
diff changeset
252 <dd>acceptorによって値(提案)が決まること.</dd>
akahori
parents: 12
diff changeset
253 <dt>値(提案)が選択(chosen)される</dt>
akahori
parents: 12
diff changeset
254 <dd>過半数以上のacceptorによって, 値(提案)がacceptされた場合, それを値(提案)が選択されたと言う.</dd>
akahori
parents: 12
diff changeset
255 </dl>
akahori
parents: 12
diff changeset
256
akahori
parents: 12
diff changeset
257
akahori
parents: 12
diff changeset
258 </div>
akahori
parents: 12
diff changeset
259 <div class='slide '>
akahori
parents: 12
diff changeset
260 <!-- _S9SLIDE_ -->
akahori
parents: 12
diff changeset
261 <h1 id="paxos-2">Paxos</h1>
akahori
parents: 12
diff changeset
262
akahori
parents: 12
diff changeset
263 <p>Paxosは2つのフェーズで動作する. 1つ目のフェーズ, prepare-promiseは次のような手順で動作する.</p>
akahori
parents: 12
diff changeset
264
akahori
parents: 12
diff changeset
265 <ul>
akahori
parents: 12
diff changeset
266 <li>proposerは提案番号nを設定した提案を過半数以上のacceptorに送る. これをprepareリクエストという.</li>
akahori
parents: 12
diff changeset
267 <li>acceptorはprepareリクエストが来たら次の動作をする.
akahori
parents: 12
diff changeset
268 <ul>
akahori
parents: 12
diff changeset
269 <li>もし, 以前に送られたprepareリクエストの提案番号より, 今送られてきたprepareリクエストの提案番号のほうが大きければ, それ以下の提案番号の提案を拒否するという約束を返す. この状態をPromiseしたという.</li>
akahori
parents: 12
diff changeset
270 <li>もし, 値がすでにacceptされていれば, accpetされた提案を返す.</li>
akahori
parents: 12
diff changeset
271 </ul>
akahori
parents: 12
diff changeset
272 </li>
akahori
parents: 12
diff changeset
273 </ul>
akahori
parents: 12
diff changeset
274
akahori
parents: 12
diff changeset
275
akahori
parents: 12
diff changeset
276 </div>
akahori
parents: 12
diff changeset
277 <div class='slide '>
akahori
parents: 12
diff changeset
278 <!-- _S9SLIDE_ -->
akahori
parents: 12
diff changeset
279 <h1 id="paxos-3">Paxos</h1>
akahori
parents: 12
diff changeset
280
akahori
parents: 12
diff changeset
281 <div style="text-align: center;">
akahori
parents: 12
diff changeset
282 <img src="./images/prepare-promise.svg" alt="blockchain" width="1000" height="500" />
akahori
parents: 12
diff changeset
283 </div>
akahori
parents: 12
diff changeset
284
akahori
parents: 12
diff changeset
285
akahori
parents: 12
diff changeset
286 </div>
akahori
parents: 12
diff changeset
287 <div class='slide '>
akahori
parents: 12
diff changeset
288 <!-- _S9SLIDE_ -->
akahori
parents: 12
diff changeset
289 <h1 id="paxos-4">Paxos</h1>
akahori
parents: 12
diff changeset
290
akahori
parents: 12
diff changeset
291 <p>2つ目のフェーズ, accept-acceptedは次のような手順で動作する.</p>
akahori
parents: 12
diff changeset
292
akahori
parents: 12
diff changeset
293 <ul>
akahori
parents: 12
diff changeset
294 <li>proposerは過半数のacceptorから返信が来たならば, 次の提案をacceptorに送る. これをacceptリクエストという.
akahori
parents: 12
diff changeset
295 <ul>
akahori
parents: 12
diff changeset
296 <li>もし, 約束のみが返ってきているならば, 任意の値vをprepareリクエストで送った提案に設定する.</li>
akahori
parents: 12
diff changeset
297 <li>もし, acceptされた提案が返ってきたら, その中で最大の提案番号を持つ提案の値v’をprepareリクエストで送った提案の値として設定する.</li>
akahori
parents: 12
diff changeset
298 </ul>
akahori
parents: 12
diff changeset
299 </li>
akahori
parents: 12
diff changeset
300 <li>acceptorはacceptリクエストが来た場合, Promiseした提案よりもacceptリクエストで提案された提案番号が低ければ, その提案を拒否する. それ以外の場合はacceptする.</li>
akahori
parents: 12
diff changeset
301 </ul>
akahori
parents: 12
diff changeset
302
akahori
parents: 12
diff changeset
303
akahori
parents: 12
diff changeset
304 </div>
akahori
parents: 12
diff changeset
305 <div class='slide '>
akahori
parents: 12
diff changeset
306 <!-- _S9SLIDE_ -->
akahori
parents: 12
diff changeset
307 <h1 id="paxos-5">Paxos</h1>
akahori
parents: 12
diff changeset
308
akahori
parents: 12
diff changeset
309 <div style="text-align: center;">
akahori
parents: 12
diff changeset
310 <img src="./images/accept-accepted.svg" alt="blockchain" width="1000" height="500" />
akahori
parents: 12
diff changeset
311 </div>
akahori
parents: 12
diff changeset
312
akahori
parents: 12
diff changeset
313
akahori
parents: 12
diff changeset
314 </div>
akahori
parents: 12
diff changeset
315 <div class='slide '>
akahori
parents: 12
diff changeset
316 <!-- _S9SLIDE_ -->
akahori
parents: 12
diff changeset
317 <h1 id="paxos-6">Paxos</h1>
akahori
parents: 12
diff changeset
318 <p>とりあえず, このアルゴリズムで値が一意に決まる.</p>
akahori
parents: 12
diff changeset
319
akahori
parents: 12
diff changeset
320
akahori
parents: 12
diff changeset
321 </div>
akahori
parents: 12
diff changeset
322 <div class='slide '>
akahori
parents: 12
diff changeset
323 <!-- _S9SLIDE_ -->
10
9627f1774b45 add slide
akahori
parents:
diff changeset
324 <h1 id="christie">Christieとは</h1>
9627f1774b45 add slide
akahori
parents:
diff changeset
325
9627f1774b45 add slide
akahori
parents:
diff changeset
326 <ul>
12
akahori
parents: 10
diff changeset
327 <li>研究室で使っていたAliceの問題点を解消した, 分散プログラミングを簡単に書けるjavaのフレームワーク.</li>
akahori
parents: 10
diff changeset
328 <li>Continued based C(CbC)と似た書き方が可能.</li>
13
akahori
parents: 12
diff changeset
329 <li>まだAliceから引き継いでない機能でTopologyManagerというものがある. これは, Topologyを構成するための機能.</li>
akahori
parents: 12
diff changeset
330 <li>簡単に言えば, ノード間の配線をしてくれる. 分散環境上で実験を行いたい場合に便利なため, これを実装してからPaxosを実装した.</li>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
331 </ul>
9627f1774b45 add slide
akahori
parents:
diff changeset
332
9627f1774b45 add slide
akahori
parents:
diff changeset
333
9627f1774b45 add slide
akahori
parents:
diff changeset
334 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
335 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
336 <!-- _S9SLIDE_ -->
9627f1774b45 add slide
akahori
parents:
diff changeset
337 <h1 id="topologymanager">TopologyManagerとは</h1>
9627f1774b45 add slide
akahori
parents:
diff changeset
338
9627f1774b45 add slide
akahori
parents:
diff changeset
339 <ul>
12
akahori
parents: 10
diff changeset
340 <li>TopologyManagerは参加を表明したノード(TopologyNode)を元にTopologyを作る.</li>
akahori
parents: 10
diff changeset
341 <li>TopologyManagerは静的Topologyと動的Topologyを作れる.</li>
akahori
parents: 10
diff changeset
342 <li>静的Topologyはdotファイルというものを読み込んで, そのとおりにTopologyを生成する.</li>
13
akahori
parents: 12
diff changeset
343 <li>動的Topologyは参加を表明したノードを動的に配置する. が, 今はTreeしか実装していない.</li>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
344 </ul>
9627f1774b45 add slide
akahori
parents:
diff changeset
345
9627f1774b45 add slide
akahori
parents:
diff changeset
346
9627f1774b45 add slide
akahori
parents:
diff changeset
347 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
348 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
349 <!-- _S9SLIDE_ -->
9627f1774b45 add slide
akahori
parents:
diff changeset
350 <h1 id="pcpaxos">PCクラスタ上でPaxosを動かした話</h1>
9627f1774b45 add slide
akahori
parents:
diff changeset
351
9627f1774b45 add slide
akahori
parents:
diff changeset
352 <ul>
12
akahori
parents: 10
diff changeset
353 <li>ブロックチェーンにおいて, 分散環境上でテストしなければいけないのはコンセンサスアルゴリズムである. そのため, Paxosを実装し, 実際の分散環境上で動かした.</li>
akahori
parents: 10
diff changeset
354 <li>評価は値が一意に決まるかどうかである. 値が一意に決まるならば, リーダーがコンセンサスをとっても良いし, ブロックについてコンセンサスをとっても良い.</li>
akahori
parents: 10
diff changeset
355 <li>今回は単純化のために, 整数でコンセンサスを取る.</li>
13
akahori
parents: 12
diff changeset
356 <li>また, ノードはproposerが2つ, acceptorが3つ, learnerが1つという構成で実験する.</li>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
357 </ul>
9627f1774b45 add slide
akahori
parents:
diff changeset
358
9627f1774b45 add slide
akahori
parents:
diff changeset
359
9627f1774b45 add slide
akahori
parents:
diff changeset
360 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
361 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
362 <!-- _S9SLIDE_ -->
13
akahori
parents: 12
diff changeset
363 <h1 id="paxos1">Paxos実験1</h1>
akahori
parents: 12
diff changeset
364
akahori
parents: 12
diff changeset
365 <div style="text-align: center;">
akahori
parents: 12
diff changeset
366 <img src="./images/paxos1.svg" alt="blockchain" width="1000" height="800" />
akahori
parents: 12
diff changeset
367 </div>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
368
9627f1774b45 add slide
akahori
parents:
diff changeset
369
9627f1774b45 add slide
akahori
parents:
diff changeset
370 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
371 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
372 <!-- _S9SLIDE_ -->
13
akahori
parents: 12
diff changeset
373 <h1 id="paxos2">Paxos実験2</h1>
akahori
parents: 12
diff changeset
374
akahori
parents: 12
diff changeset
375 <div style="text-align: center;">
akahori
parents: 12
diff changeset
376 <img src="./images/paxos2.svg" alt="blockchain" width="1000" height="1000" />
akahori
parents: 12
diff changeset
377 </div>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
378
9627f1774b45 add slide
akahori
parents:
diff changeset
379
9627f1774b45 add slide
akahori
parents:
diff changeset
380 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
381 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
382 <!-- _S9SLIDE_ -->
13
akahori
parents: 12
diff changeset
383 <h1 id="paxos3">Paxos実験3</h1>
akahori
parents: 12
diff changeset
384
akahori
parents: 12
diff changeset
385 <div style="text-align: center;">
akahori
parents: 12
diff changeset
386 <img src="./images/paxos3.svg" alt="blockchain" width="1000" height="1000" />
akahori
parents: 12
diff changeset
387 </div>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
388
9627f1774b45 add slide
akahori
parents:
diff changeset
389
9627f1774b45 add slide
akahori
parents:
diff changeset
390 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
391 <div class='slide '>
9627f1774b45 add slide
akahori
parents:
diff changeset
392 <!-- _S9SLIDE_ -->
13
akahori
parents: 12
diff changeset
393 <h1 id="section-7">まとめ</h1>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
394
9627f1774b45 add slide
akahori
parents:
diff changeset
395 <ul>
12
akahori
parents: 10
diff changeset
396 <li>コンセンサスアルゴリズムのPaxosを実装しました.</li>
akahori
parents: 10
diff changeset
397 <li>ブロック, トランザクション, proof of workも実装しました. ただ, トランザクションはファイルのデータを読めるようにはしていません.</li>
akahori
parents: 10
diff changeset
398 <li>これらを繋げてブロックチェーンにできれば, Christieにブロックチェーンが実装されます. パブリックブロックチェーンもプライベートブロックチェーンもどちらも作れます.</li>
10
9627f1774b45 add slide
akahori
parents:
diff changeset
399 </ul>
9627f1774b45 add slide
akahori
parents:
diff changeset
400 <!-- === end markdown block === -->
9627f1774b45 add slide
akahori
parents:
diff changeset
401 </div>
9627f1774b45 add slide
akahori
parents:
diff changeset
402
9627f1774b45 add slide
akahori
parents:
diff changeset
403
9627f1774b45 add slide
akahori
parents:
diff changeset
404 </div><!-- presentation -->
9627f1774b45 add slide
akahori
parents:
diff changeset
405 </body>
9627f1774b45 add slide
akahori
parents:
diff changeset
406 </html>