Distributed Databases Deconstructed: CockroachDB, TiDB and YugaByte DBYugabyteDB
Slides for Amey Banarse's, Principal Data Architect at Yugabyte, "Distributed Databases Deconstructed: CockroachDB, TiDB and YugaByte DB" webinar recorded on Oct 30, 2019 at 11 AM Pacific.
Playback here: https://vimeo.com/369929255
Distributed Databases Deconstructed: CockroachDB, TiDB and YugaByte DBYugabyteDB
Slides for Amey Banarse's, Principal Data Architect at Yugabyte, "Distributed Databases Deconstructed: CockroachDB, TiDB and YugaByte DB" webinar recorded on Oct 30, 2019 at 11 AM Pacific.
Playback here: https://vimeo.com/369929255
Using MHA (Master High Availability Manager for MySQL) and Murakumo (distributed internal dns) to achieve a simple highly-available environment.
#autotechcasual
Redmineに全文検索エンジンGroongaサポートを追加する「Full Text Search」プラグインを紹介します。このプラグインを使えば数十万チケットがあるRedmineでも高速に目的の情報を見つけられます。高速になるという現状の話だけでなく、Redmine内のデータを有効活用するという今後の話もします。
RubyKaigi 2022 - Fast data processing with Ruby and Apache ArrowKouhei Sutou
I introduced Ruby and Apache Arrow integration including the "super fast large data interchange and processing" Apache Arrow feature at RubyKaigi Takeout 2021.
This talk introduces how we can use the "super fast large data interchange and processing" Apache Arrow feature in Ruby. Here are some use cases:
* Fast data retrieval (fast pluck) from DB such as MySQL and PostgreSQL for batch processes in a Ruby on Rails application
* Fast data interchange with JavaScript for dynamic visualization in a Ruby on Rails application
* Fast OLAP with in-process DB such as DuckDB and Apache Arrow DataFusion in a Ruby on Rails application or irb session
RubyKaigi Takeout 2021 - Red Arrow - Ruby and Apache ArrowKouhei Sutou
To use Ruby for data processing widely, Apache Arrow support is important. We can do the followings with Apache Arrow:
* Super fast large data interchange and processing
* Reading/writing data in several famous formats such as CSV and Apache Parquet
* Reading/writing partitioned large data on cloud storage such as Amazon S3
This talk describes the followings:
* What is Apache Arrow
* How to use Apache Arrow with Ruby
* How to integrate with Ruby 3.0 features such as MemoryView and Ractor
Apache Arrow 1.0 - A cross-language development platform for in-memory dataKouhei Sutou
Apache Arrow is a cross-language development platform for in-memory data. You can use Apache Arrow to process large data effectively in Python and other languages such as R. Apache Arrow is the future of data processing. Apache Arrow 1.0, the first major version, was released at 2020-07-24. It's a good time to know Apache Arrow and start using it.
Apache Arrow - A cross-language development platform for in-memory dataKouhei Sutou
Apache Arrow is the future for data processing systems. This talk describes how to solve data sharing overhead in data processing system such as Spark and PySpark. This talk also describes how to accelerate computation against your large data by Apache Arrow.
csv, one of the standard libraries, in Ruby 2.6 has many improvements:
* Default gemified
* Faster CSV parsing
* Faster CSV writing
* Clean new CSV parser implementation for further improvements
* Reconstructed test suites for further improvements
* Benchmark suites for further performance improvements
These improvements are done without breaking backward compatibility.
This talk describes details of these improvements by a new csv maintainer.
PGroonga 2 – Make PostgreSQL rich full text search system backend!Kouhei Sutou
PGroonga 2.0 has been released with 2 years development since PGroonga 1.0.0. PGroonga 1.0.0 just provides fast full text search with all languages support. It's important because it's a lacked feature in PostgreSQL. PGroonga 2.0 provides more useful features to implement rich full text search system with PostgreSQL. This session shows how to implement rich full text search system with PostgreSQL!
This talk describes about PGroonga that resolves these problems.
PostgreSQL Conference Japan 2017の資料です。
PostgreSQLが苦手な全文検索機能を強力に補完する拡張機能PGroongaの最新情報を紹介します。PGroongaは単なる全文検索モジュールではありません。PostgreSQLで簡単にリッチな全文検索システムを実現するための機能一式を提供します。PGroongaは最新PostgreSQLへの対応も積極的です。例としてロジカルレプリケーションと組み合わせた活用方法も紹介します。
Improve extension API: C++ as better language for extensionKouhei Sutou
The document discusses improving the performance of Ruby extensions written in C++. It proposes using C++ as the language for extensions rather than C, as C++ has convenient features like type inference, lambda expressions, and default arguments that make extensions easier to write. It recommends providing a convenient API like Ext++ that allows defining Ruby classes and methods directly in C++ code similar to how it is done in Ruby. This avoids the verbosity of raw C APIs and allows leveraging modern C++ features for high performance extension code that stays within C++ as much as possible without moving between C++ and Ruby.
PGroonga is fast and flexible full text search extension for PostgreSQL. Zulip is a chat tool that uses PostgreSQL and PGroonga. This talk describes why PGroonga is suitable for Zulip.
14. Mroonga開発者が 来たぞ! Powered by Rabbit 2.2.0
カラムストア
カラム
行
a b c
1
2
3
値 値 値
値 値 値
値 値 値
カラム
行
a b c
1
2
3
値 値 値
値 値 値
値 値 値
Mroonga
カラムごと
InnoDB他
カラム 行
値の管理単位 行ごと
高速なアクセス単位
15. Mroonga開発者が 来たぞ! Powered by Rabbit 2.2.0
必要なカラムのみアクセス
-- aのみにアクセス
SELECT a
FROM table
-- cのみにアクセス
WHERE c = XXX;
-- bにはアクセスしない
16. Mroonga開発者が 来たぞ! Powered by Rabbit 2.2.0
減ったI/O
カラム
行
a b c
1
2
3
値 値 値
値 値 値
値 値 値
カラム
行
a b c
1
2
3
値 値 値
値 値 値
値 値 値
Mroonga
カラムごと
InnoDB他
カラム 行
値の管理単位 行ごと
高速なアクセス単位
アクセスしない
17. Mroonga開発者が 来たぞ! Powered by Rabbit 2.2.0
行カウント
-- カラムの値は必要ない
SELECT COUNT(*)
FROM table
-- cの全文検索インデックスにだけアクセス
WHERE MATCH(c)
AGAINST('+keyword' IN BOOLEAN MODE);
-- a, b, cはアクセスしない
18. Mroonga開発者が 来たぞ! Powered by Rabbit 2.2.0
減ったI/O
カラム
行
a b c
1
2
3
値 値 値
値 値 値
値 値 値
カラム
行
a b c
1
2
3
値 値 値
値 値 値
値 値 値
Mroonga
カラムごと
InnoDB他
カラム 行
値の管理単位 行ごと
高速なアクセス単位
アクセスしない
19. Mroonga開発者が 来たぞ! Powered by Rabbit 2.2.0
ORDER BY LIMIT
SELECT *
FROM table
WHERE MATCH(c)
AGAINST('+keyword' IN BOOLEAN MODE)
-- MySQLではなくMroongaがORDER BY LIMITを処理
-- →Mroongaは10レコードだけMySQLに返す
-- マッチしたレコードすべては返さない
ORDER BY a LIMIT 10;
20. Mroonga開発者が 来たぞ! Powered by Rabbit 2.2.0
ORDER BY LIMITの最適化
Mroongaが検索
カラム毎の処理でI/Oを局所化
(索引非使用時)
Mroongaがソート
カラム毎の処理でI/Oを局所化
MroongaがOFFSET/LIMITを処理
21. Mroonga開発者が 来たぞ! Powered by Rabbit 2.2.0
カラム毎の処理は速い
カラム
行
a b c
1
2
3
値 値 値
値 値 値
値 値 値
カラム
行
a b c
1
2
3
値 値 値
値 値 値
値 値 値
Mroonga
カラムごと
InnoDB他
カラム 行
値の管理単位 行ごと
高速なアクセス単位