LoginSignup
0
0

More than 5 years have passed since last update.

高速RDB VoltDBのサンプルアプリケーションを動かしてみる

Last updated at Posted at 2018-12-21

はじめに

超高速RDB VoltDBのサンプルアプリケーションを動かしてみます。

環境は以下の記事で構築した、v8.3.1を用います。

超高速RDB VoltDBのサンプルアプリケーションを動かしてみる

投票のサンプルアプリケーションを動かしてみます。

まず、スキーマが空のVoltDBノードを起動します。

# voltdb create --force

サンプルアプリケーションはVoltDBのインストールディレクトリ(今回は/opt/voltdb)のexampleディレクトリ以下にあります。
そのうちの1つ、voterアプリケーションを動かしてみます。
まず、以下のようにDDLを読み込みスキーマを作成します。

# cd /opt/voltdb/examples/voter
# sqlcmd < ddl.sql

以下のコマンドで実行します。実行すると、投票アプリのクライアントが動き、スループットがコンソールに出力されます。

# ./run.sh client

~省略~

--------------------------------------------------------------------------------
 Starting Benchmark
--------------------------------------------------------------------------------

Warming up...

Running benchmark...
00:00:05 Throughput 38590/s, Aborts/Failures 0/0
00:00:10 Throughput 45848/s, Aborts/Failures 0/0
00:00:15 Throughput 51128/s, Aborts/Failures 0/0
00:00:20 Throughput 51626/s, Aborts/Failures 0/0

Web管理コンソールで確認すると、VOTESテーブル等に約5百万レコードが挿入されていますね。

image.png

アプリケーションの詳細は、example以下にソースがあるので確認してください。
VirtualBox上のVMで秒間5万トランザクション/秒もでているのが驚愕。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0