droonga as-groonga-with-replication-droonga-as-groonga-with-replication
TRANSCRIPT
![Page 1: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/1.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
Droonga
分散Groongaで快適レプリケーション生活
結城洋志 株式会社クリアコード
![Page 2: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/2.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
Droongaって?
Distributed Groonga
![Page 3: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/3.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
要旨
1年間の進捗報告
「分散Groonga」としてのDroonga 1.0.8の現状紹介
実際に試してみる(できれば)
![Page 4: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/4.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
今日話すこと
分散型データ処理エンジンDroongaの
組み込みプラグインの1つGroongaプラグイン
使い方
Groonga v.s. Droonga
![Page 5: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/5.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
今日話さないこと
Droongaの設計のこと
![Page 6: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/6.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
Part1
-Part1-1年間の進捗報告
![Page 7: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/7.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
昨年の発表
設計方針
実装
(当時の)現状
(当時の)今後の予定
![Page 8: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/8.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
大まかに言って
全く新しい・汎用の分散型データ処理エンジンとして
「こういう設計でこう動きます」
「こういう事もやろうと思えばできます」
「こうやって今すぐ試せます」という話はあまり無かった
![Page 9: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/9.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
なんで?
どっちかというとフレームワーク
具体的な用途を先に決めないと話が始まらない
全文検索をやりたいだけでもやり方がGroongaとは全く違う
![Page 10: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/10.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
ハードル高すぎ
![Page 11: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/11.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
使うとしても
設計を熟知した人が
用途ごとの最適な構成を考え
ログ保存&検索用?
掲示板のバックエンド用?
丁寧な手作業でひとつひとつセットアップ&設定
![Page 12: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/12.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
職人芸の世界
![Page 13: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/13.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
問題
ユーザにとって
気軽に試せない
Groongaユーザには馴染みにくい
開発者にとって
「汎用かつ便利」は作るのが大変
Groongaユーザを長く放置してしまう
![Page 14: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/14.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
当初の開発方針
![Page 15: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/15.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
進め方を見直し
![Page 16: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/16.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
どう変わった?
変わらないこと
最終的に作る物
変わったこと
作る順番
プロジェクト外への見せ方
![Page 17: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/17.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
ここまでの成果(1)
Groongaとの互換性向上
簡単インストール&セットアップ
管理コマンドによる簡単クラスタ管理
![Page 18: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/18.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
すぐ使える
$ curl "http://...engine.../install.sh" | \ sudo bash$ curl "http://...http-server.../install.sh" | \ sudo bash$ service droonga-engine start$ service droonga-http-server start
$ droonga-engine-join --host=node1 \ --replica-soruce-host=node0$ droonga-engine-join --host=node2 \ --replica-soruce-host=node0
$ curl "http://hostname:10041/d/select?..."
![Page 19: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/19.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
ここまでの成果(2)
オーケストレーション(based on Serf)
一部のノードが死んでもクラスタとして動作し続ける
チュートリアルの充実
![Page 20: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/20.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
結果
レプリケーションできるGroonga
としてそこそこ使えるようになってきたはず
![Page 21: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/21.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
Part2
-Part2-分散Groongaとしての
Droongaの紹介
![Page 22: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/22.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
特徴
特徴
![Page 23: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/23.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
Groonga互換
![Page 24: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/24.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
データベースを分散
レプリケーション
現在の開発はここに注力
パーティショニング
現在は部分的に対応(これから改善)
![Page 25: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/25.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
レプリケーション
システムの冗長性や耐障害性が高まる
![Page 26: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/26.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
パーティショニング
より多くの量のデータを管理できる
![Page 27: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/27.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
実際の性能は?
Groonga v.s. Droongaベンチマーク
Wikipedia日本語版150万ページ
全文検索+ドリルダウン
キャッシュヒット率50%
詳細はリポジトリを参照
![Page 28: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/28.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
スループットの比較
![Page 29: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/29.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
レイテンシーの比較
![Page 30: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/30.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
性能の傾向
スループット性能は良好
レイテンシーは若干ある
同時接続数が多いと性能が逆転
ノード追加でGroongaの性能上の限界を超えられる
![Page 31: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/31.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
これからのDroonga
Groonga互換
Suggest(ローマ字前方一致検索)
汎用分散データ処理エンジン
完全無停止でのクラスタ構成変更
パーティショニング有りの構成
プラグイン開発をより容易に
![Page 32: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/32.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
まとめ
まとめ
![Page 33: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/33.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
まとめ
Droongaは汎用の分散型データ処理エンジン
組み込みのプラグインによってレプリケーション有りのGroongaとして使える
![Page 34: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/34.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
質問?
質問?
![Page 35: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/35.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
Part3
-Part3-Droongaを試してみよう
![Page 36: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/36.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
試してみよう
インストールと起動
Groongaからのデータ移行
GroongaアプリケーションのバックエンドをDroongaに切り替え
クラスタにノードを追加
![Page 37: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/37.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
ノードのセットアップ
インストールスクリプト(Ubuntu、CentOS7のみ対応)
# curl \ https://raw.githubusercontent.com/droonga/droonga-engine/master/install.sh | \ bash# curl \ https://raw.githubusercontent.com/droonga/droonga-http-server/master/install.sh | \ bash
![Page 38: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/38.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
サービスの起動
serviceコマンドを使用
# service droonga-engine start# service droonga-http-server start
![Page 39: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/39.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
サービスの終了
serviceコマンドを使用
# service droonga-engine stop# service droonga-http-server stop
![Page 40: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/40.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
データの移行
% sudo gem install rroonga grn2drn droonga-client
% grndump --no-dump-tables /path/to/groonga/db | \ grn2drn | \ droonga-send --server=node0 \ --report-throughput)% grndump --no-dump-schema --no-dump-indexes \ /path/to/groonga/db | \ grn2drn | \ droonga-send --server=node0 \ --server=node1 \ --server=node2 \ ... --report-throughput)
![Page 41: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/41.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
アプリケーションの移行
GroongaのHTTPインターフェースと互換性あり
curl "http://hostname:10041/d/select?..."
アプリケーションは接続先をDroongaに変えるだけでOK
![Page 42: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/42.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
クラスタへのノード追加
% droonga-engine-join --host=cccc \ --replica-source-host=bbbb
![Page 43: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/43.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
ノードの切り離し
% droonga-engine-unjoin --host=cccc
![Page 44: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/44.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
再度まとめ
Droongaは汎用の分散型データ処理エンジン
組み込みのプラグインによってレプリケーション有りのGroongaとして使える
HTTPインターフェースはGroongaと互換性有り
![Page 45: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/45.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
宣伝
宣伝
![Page 46: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/46.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
株式会社クリアコードGroonga有償サポート
Groonga以外のGroonga族も
Mozilla有償サポート
Firefox, Thunderbird, Firefox OS
その他OSS開発全般
コードリーダー育成支援
![Page 47: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/47.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
個人の活動
日経Linux誌にて
シェルスクリプト解説マンガ#!シス管系女子連載中
![Page 48: Droonga as-groonga-with-replication-droonga-as-groonga-with-replication](https://reader038.vdocuments.net/reader038/viewer/2022103002/55b15184bb61eb73258b45c9/html5/thumbnails/48.jpg)
Droonga - 分散Groongaで 快適レプリケーション生活 Powered by Rabbit 2.1.3
おわり
Droonga, Groonga, 株式会社クリアコードを宜しくお願いします
使用画像
写真素材 足成:秋葉原
職人のおじいちゃん by Neil_Scottuk