VoltDBおためし

VoltDBとは

インメモリデータベースですよ。
知ったきっかけは
「過負荷に耐えるWebの作り方-国民的アイドルグループ選抜総選挙の舞台裏」です。

過負荷に耐えるWebの作り方 ~国民的アイドルグループ選抜総選挙の舞台裏 (Software Design plus)

過負荷に耐えるWebの作り方 ~国民的アイドルグループ選抜総選挙の舞台裏 (Software Design plus)

サンプルプログラムを動かしてみます。

試した環境

サーバ

OS:CentOS6.5 64bit
VoltDBインストール済み
Eclipseインストール済み

VoltDB移動

Eclipseでプロ視者とか作ることを見越して
VoltDBをworkspaceに持ってくる

# cd ~/workspace
# mv ~/projects/voltdb .
# cd voltdb
# cp template.classpath .classpath

VoltDBサーバ起動(voterサンプル)

# cd ./examples/voter
# ./run.sh srccompile
# ./run.sh catalog
# ./run.sh server
Starting the VoltDB server.
To perform this action manually, use the command line:

/root/workspace/voltdb/bin/voltdb create -d deployment.xml -l /root/workspace/voltdb/voltdb/license.xml -H localhost voter.jar

Initializing VoltDB...

 _    __      ____  ____  ____
| |  / /___  / / /_/ __ \/ __ )
| | / / __ \/ / __/ / / / __  |
| |/ / /_/ / / /_/ /_/ / /_/ /
|___/\____/_/\__/_____/_____/

--------------------------------

Build: 4.0.2 voltdb-4.0.1.2-229-geb0c10c Community Edition
Connecting to VoltDB cluster as the leader...
Host id of this node is: 0
Initializing the database. This may take a moment...
WARN: This is not a highly available cluster. K-Safety is set to 0.
WARN: Durability is turned off. Command logging is off.
Server completed initialization.

VoltDBクライアント起動(voterサンプル)

別端末で

# cd ./examples/voter
# ./run.sh client
(略)
--------------------------------------------------------------------------------
 Starting Benchmark
--------------------------------------------------------------------------------

Warming up...

Running benchmark...
00:00:05 Throughput 61454/s, Aborts/Failures 0/0
(略)

なんかベンチマークが動く

https://github.com/VoltDB/voltdb/wiki/Setting-up-an-Eclipse-Project