annotate index.html @ 0:fdc457266e2d default tip

hg init
author shoshi tamaki
date Fri, 14 Jan 2011 02:02:46 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
3
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
4 <html xmlns="http://www.w3.org/1999/xhtml">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
5
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
6 <head>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
7 <title>Cassandraを利用したサービスのPCクラスタを利用したスケーラビリティの検証</title>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
8 <!-- metadata -->
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
9 <meta name="generator" content="S5" />
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
10 <meta name="version" content="S5 1.1" />
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
11 <meta name="presdate" content="20100807" />
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
12 <meta name="author" content="ShoshiTAMAKI" />
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
13 <meta name="company" content="University of Ryukyus" />
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
14 <meta http-equiv="ContentType : text/html; charset=UTF-8"/>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
15 <!-- configuration parameters -->
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
16 <meta name="defaultView" content="slideshow" />
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
17 <meta name="controlVis" content="hidden" />
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
18 <!-- style sheet links -->
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
19 <link rel="stylesheet" href="ui/default/slides.css" type="text/css" media="projection" id="slideProj" />
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
20 <link rel="stylesheet" href="ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" />
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
21 <link rel="stylesheet" href="ui/default/print.css" type="text/css" media="print" id="slidePrint" />
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
22 <link rel="stylesheet" href="ui/default/opera.css" type="text/css" media="projection" id="operaFix" />
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
23 <!-- embedded styles -->
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
24 <style type="text/css" media="all">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
25 .imgcon {width: 525px; margin: 0 auto; padding: 0; text-align: center;}
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
26 #anim {width: 270px; height: 320px; position: relative; margin-top: 0.5em;}
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
27 #anim img {position: absolute; top: 42px; left: 24px;}
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
28 img#me01 {top: 0; left: 0;}
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
29 img#me02 {left: 23px;}
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
30 img#me04 {top: 44px;}
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
31 img#me05 {top: 43px;left: 36px;}
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
32 </style>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
33 <!-- S5 JS -->
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
34 <script src="ui/default/slides.js" type="text/javascript"></script>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
35 </head>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
36 <body>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
37
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
38 <div class="layout">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
39 <div id="controls"><!-- DO NOT EDIT --></div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
40 <div id="currentSlide"><!-- DO NOT EDIT --></div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
41 <div id="header"></div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
42 <div id="footer">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
43 <h1>Cassandraを利用したサービスのPCクラスタを用いたスケーラビリティの検証</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
44 <h2>shizuku.cr.ie.u-ryukyu.ac.jp</h2>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
45 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
46
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
47 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
48 <div class="presentation">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
49
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
50 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
51 <h1>Cassandraを利用したサービスのPCクラスタを用いたスケーラビリティの検証</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
52 <h3>Shoshi TAMAKI , Shinji KONO</h3>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
53 <h4><a href="http://www.cr.ie.u-ryukyu.ac.jp/">University of Ryukyus</a></h4>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
54 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
55
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
56 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
57 <h1>研究の目的</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
58 <p>インターネット上のサービスで重要なのはスケーラビリティ、つまり、ユーザのアクセスの増大に対して一定のサービス品質を提供することである。
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
59 <p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
60 スケーラブルなサービスを提供するために分散Key-Value store Cassandra が注目されている。 RDBの個々のテーブルも、Key-Value store と見ることができる。
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
61 <p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
62 本研究では,特に汎用性のある木構造を扱うインターネットサービスに着目する。Cassandra 上に木構造を取り扱うサービスをスケーラブルに提供するフレームワークを設計し実装する。
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
63 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
64
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
65 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
66 <h1>研究のスケジュール</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
67 <small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
68 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
69 <li>第1クォーター:Cassandraの検証</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
70 <li>第2クォーター:スケーラビリティの高いサービスの設計</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
71 <li>第3クォーター:<span style="color:red;">スケーラビリティの高いサービスの実装</span></li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
72 <li>第4クォーター:実装したサービスの検証</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
73 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
74 <p>1Qでは、Cassandra のPCクラスタを用いたスケーラビリティを実験する環境を構築した。</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
75 <p>しかし、1対1の環境ではmySQLの方が性能が良かった。</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
76 <p>今回はCassandraが実際にスケールすることを確認した。</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
77 <p>その結果を元に、木構造をスケーラブルに取り扱うシステムの設計を行なった。</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
78 </small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
79 <div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
80
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
81 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
82 <h1>1Qまでのあらすじ</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
83 <p>前回の発表では以下のことについて発表を行った.</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
84 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
85 <li>Cassandraの紹介と基本的な使用方法</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
86 <li>Cassandraを利用したアプリケーション</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
87 <li>コンシステント・ハッシュ</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
88 <li>1台のクライアントとサーバーを用いた簡単なベンチマーク</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
89 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
90 <p>シンプルなベンチマークではMySQLにCassandraでは超えられられなかった</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
91 <p>課題として,Cassandraがスケールする条件の検証が残った.</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
92 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
93
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
94 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
95 <h1>2Qまでのあらすじ</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
96 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
97 <li>スケーラビリティの検証環境をTorqueを使って構築した</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
98 <li>Cassandraが実際にスケールすることを実験で確認した</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
99 <li>スケーラビリティの高い木構造を対象としたサービスの設計を行った</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
100 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
101 <small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
102 <p>3Qの課題としてCassandraのノード数を増やした場合、コア数の多いサーバの場合の検証が必要なこともわかった。</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
103 <p>プロタイプ実装でも実験によってスケーラビリティを確認しながら設計/実装を深めていく必要がある。</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
104 </small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
105 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
106
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
107 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
108 <h1>前回の実験概要</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
109 <div align="center">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
110 <img width="400px" src="./pics/benchmark.png"/>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
111 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
112 <small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
113 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
114 <li>Torqueを利用して,任意台数のクラスタ(クライアント)に同時にスクリプトを実行させる</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
115 <li>スクリプトは,ある時間になると一斉に目的のサーバーに1万回のアクセスを開始する</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
116 <li>クラスタの台数を変動させCassandraとMySQLサーバーに負荷をかける.</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
117 <li>複数台のクラスタが処理に要した時間の平均をグラフ化し比較する.</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
118 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
119 </small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
120 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
121
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
122 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
123 <h1>前回の実験方法</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
124 <div align="center">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
125 <img width="60%" src="./pics/how_to_benchmark.png"/>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
126 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
127 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
128
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
129 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
130 <h1>実験環境</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
131 <p>ベンチマークを取るために構築した環境</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
132 <table align="center" border="1">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
133 <tr>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
134 <th></th>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
135 <th>クラスタ</th>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
136 <th>MacMini</th>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
137 <th>Core i7</th>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
138 </tr>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
139 <tr>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
140 <th></th>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
141 <td>クライアント</td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
142 <td>サーバ</td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
143 <td>サーバ</td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
144 </tr>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
145 <tr>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
146 <th>CPU</th>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
147 <td>Core Duo 2G (<span style="color: red;">1</span>)</td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
148 <td>Core 2 Duo 2.53G (<span style="color: red;">2</span>)</td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
149 <td>Core i7 3.0G (<span style="color: red;">4</span>)</td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
150 </tr>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
151 <tr>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
152 <th>Memory</th>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
153 <td>1GB</td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
154 <td>4GB</td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
155 <td>14GB</td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
156 </tr>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
157 <tr>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
158 <th>OS</th>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
159 <td>CentOS 5</td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
160 <td>OSX 10.6</td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
161 <td>CentOS 5</td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
162 </tr>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
163 </table>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
164 <small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
165 <p>このうちクラスタは80台用意されている.</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
166 <p>()内はコア数で,Core i7のみ4コア8スレッドである.</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
167 </small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
168 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
169
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
170 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
171 <h1>前回のベンチマークのまとめ</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
172 <small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
173 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
174 <li>クライアントが複数いるときにCassndraが性能を発揮する.</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
175 <li>コア数の少ないサーバーでは,性能が落ちる</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
176 <li>コア数の多いサーバーでは,MySQLより平均時間の増加度が少ない.</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
177 <li>サーバーの台数を増やすだけでは1台の性能を超えることはできない.</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
178 <li>Cassandraの性能を活かすことのできる,条件はコア数の多いサーバーでかつ読み書きが頻繁に行われるアプリケーションであるということが分かった.</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
179 <li>MacMini の性能はここまでか? サーバを増やせば良くなる可能性もある?</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
180 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
181 </small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
182 <p>Cassandraの特徴・性能を検証できた,ではどのようにシステムを開発すればスケールするのか?</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
183 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
184
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
185 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
186 <h1>スケーラビリティのあるサービスの開発</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
187 <p>クラスタを用いたベンチマークにより, Cassandraの性能とスケーラビリティの検証方法を確認することができた.
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
188 <br/>これを踏まえた上でCassandraを利用したスケーラビリティのあるサービスを開発する.</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
189 <p>スケーラビリティがあるということは?</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
190 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
191 <li>負荷がかかっても遅くならない</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
192 <li>サーバーの台数を増やすだけで性能を維持できる</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
193 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
194 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
195
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
196 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
197 <h1>スケーラビリティを高めるためには</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
198 <small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
199 <p>[方法1]データの複製を多く用意する</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
200 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
201 <li>一つのデータにアクセスが集中するとネットワークが遅くなるが,分散させることで避けることができる</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
202 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
203 </small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
204 <div align="center">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
205 <img width="670px" src="./pics/share_or_copy.png"/>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
206 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
207 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
208
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
209 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
210 <h1>スケーラビリティを高めるためには</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
211 <small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
212 <p>[方法2]データの伝搬にはポーリングを利用する</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
213 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
214 <li>データに更新があったとき,すべてのコピーデータに通知すると通信量が膨大になる.</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
215 <li>実際には必要なときに更新すればよいため,通知するのではなく見に行く(ポーリング)を行えばよい.(頻度が低く範囲が小さいと期待される)</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
216 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
217 </small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
218 <div align="center">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
219 <img width="650px" src="./pics/notify_or_polling.png"/>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
220 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
221 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
222
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
223 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
224 <h1>提案するシステムのアーキテクチャ</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
225 <p>CassandraとWebサーバーが直接通信するのではなく, 間にサービスのAPIを提供するサーバーを挟む</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
226 <table align="center">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
227 <tr>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
228 <td><img width="400px" src="./pics/arch.png"/></td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
229 <td><p>テストをサービスAPIの段階で行える</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
230 <p>PHP, Grails, Servlet 等にも対応可能</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
231 </td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
232 </tr>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
233 </table>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
234 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
235
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
236 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
237 <h1>システムのアーキテクチャ</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
238 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
239 <li>開発言語はJavaを利用</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
240 <li>APIを提供するためにCassandraも利用しているRPCである,Thriftを使用する</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
241 <!-- スケールするシステムの上に、スケールしないシステムを作るべきではない? -->
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
242 <li>SEDAを採用するか,しないかは未定 (採用すると、性能は出るが複雑になる) </li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
243 <li>スケーラビリティは検証してみないと確認できない</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
244 <li>そのため,プロトタイプを作成してその性能を検証しながら開発をすすめる</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
245 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
246 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
247
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
248 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
249 <h1>データ構造</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
250 <p>スケールするサービスを開発するためにはスケールするデータ構造を考える必要がある</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
251 <p>サービスのデータ構造として木構造を利用したい,しかし,これがスケールする必要がある</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
252 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
253 <li>通常の木構造(破壊的木構造)</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
254 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
255 <li>データを書き換えて木を編集する</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
256 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
257 <li>非破壊的木構造</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
258 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
259 <li>データを書き換えず,コピーして編集する</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
260 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
261 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
262 <p>今回は非破壊的木構造を使用して開発を行う</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
263 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
264
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
265 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
266 <h1>非破壊的木構造</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
267 <p>編集する木構造の内容を変更せずに, 変更するノードのコピーと変更がないノードで新しく木構造を作る</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
268 <div align="center">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
269 <table>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
270 <tr>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
271 <td><img width="350px" src="./pics/hakai_tree.png"/></td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
272 <td><img width="400px" src="./pics/hihakai_tree.png"/></td>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
273 </tr>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
274 </table>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
275 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
276 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
277
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
278 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
279 <h1>コピーの場合の比較(破壊的木構造)</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
280 <small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
281 <p>[方法1]に則ってスケールするためには,複製を作成しやすいデータ構造である必要がある.<br/>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
282 破壊の場合は変更を複製全部に通知する必要がある</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
283 </small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
284 <div align="center">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
285 <img width="650px" src="./pics/dest_tree_copy.png"/>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
286 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
287 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
288
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
289 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
290 <h1>コピーの場合の比較(非破壊的木構造)</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
291 <p>非破壊の場合は自由に複製を作って良い</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
292 <div align="center">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
293 <img width="650px" src="./pics/mono_tree_copy.png"/>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
294 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
295 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
296
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
297 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
298 <h1>ポーリングの場合の比較</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
299 <p>[方法2]に則って変更の通知をポーリングでやりやすいデータ構造を選択する必要がある.</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
300 <p>破壊的変更の場合はポーリングでは木全体を見る必要がある.なので通知の方が現実的</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
301 <p>非破壊の場合は木の先頭を見れば更新されているかどうかがわかる(ポーリングのアクセスの集中を防ぐ工夫は必要)</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
302 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
303
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
304 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
305 <h1>非破壊的木構造</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
306 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
307 <li>利点</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
308 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
309 <li>ロックを必要としない</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
310 <li>複製を自由に作成することができる(変更を伝搬する必要はなく,複製先が監視すればよい)</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
311 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
312 <li>欠点</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
313 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
314 <li>次々に複製を作成するため,メモリ使用量が多い</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
315 <li>編集するための計算量が多い(編集対象のノードまでのパスの長さまで複製するため)</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
316 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
317 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
318 <p>ロックを必要としない・複製を自由に作成できるという利点からスケールするのではないかと考えられる</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
319 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
320
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
321 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
322 <h1>非破壊木構造Editorの実装</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
323 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
324 <li>イメージとしては分散リポジトリ(Git,Mercurial)</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
325 <li>APIとしてcommit,push,pull,update,discard,mergeがある。</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
326 <li>木構造をコピーし、ローカルへ保存して編集しリモートへ更新する。(非破壊的)</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
327 <li>更新は変更をコミットする際に検出する。(ポーリングの利用)</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
328 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
329 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
330
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
331 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
332 <h1>非破壊木構造Editorの実装</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
333 <div align="center">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
334 <img width="60%" src="pics/editor01.png"/>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
335 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
336 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
337
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
338 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
339 <h1>非破壊木構造Editorの実装</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
340 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
341 <li>このEditorを各ステージ(ブラウザ上、APIサーバー上、Cassandra)において実装する。</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
342 <li>こうすることで非破壊構造を分散して構築することが出来る。</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
343 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
344 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
345
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
346 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
347 <div align="center">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
348 <img width="70%" src="pics/multistage_copy.png"/>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
349 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
350 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
351
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
352 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
353 <h1>OnMemory上の非破壊木構造の実装</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
354 <p>これは書くの必要ですか?</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
355 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
356
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
357 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
358 <h1>Cassandra上での非破壊構造の実装</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
359 <p>これは書くの必要ですか?</p>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
360 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
361
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
362 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
363 <h1>リンクの実装</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
364 <small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
365 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
366 <li>非破壊木構造の特性上、ルートノードに負荷がかかる。</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
367 <li>そのため、リンクを導入しある部分で親ノードに更新が伝搬しないようにする。</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
368 <li>リンクされた先をルートノードとし編集することでリンクの親ノードへ更新は伝搬されない。</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
369 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
370 </small>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
371 <div align="center">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
372 <img width="75%" src="pics/link.png"/>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
373 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
374 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
375
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
376 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
377 <h1>まとめ</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
378 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
379 <li>非破壊木構造Editorは分散リポジトリを参考にした構造。</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
380 <li>ローカルにコピーし、それを非破壊的に変更していく。</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
381 <li>複数ステージにおいてツリーをコピーし、それぞれの段階で非破壊的に編集する。</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
382 <li>ルートノードの負荷分散のためにリンクを導入する。</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
383 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
384 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
385
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
386 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
387 <h1>今後の課題</h1>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
388 <ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
389 <li>実装したEditorを使ったベンチマークテスト</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
390 <li>引き続きEditorの実装</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
391 <li>レンダリングエンジンの実装</li>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
392 </ul>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
393 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
394
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
395 <div class="slide">
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
396 <h2>ご清聴ありがとうございました</h2>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
397 </div>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
398
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
399 </body>
fdc457266e2d hg init
shoshi tamaki
parents:
diff changeset
400 </html>