[erlang-questions] [ANN]: New Erlvolt

Henning Diedrich hd2010@REDACTED
Fri Apr 12 06:53:37 CEST 2013


Hi list,

an all-new iteration of the VoltDB driver Erlvolt has been released.

It's easy to use, provides strong connection pooling, plus a broad array of options. It is optimized for a central node architecture, and maximal throughput.

VoltDB is a scalable, Open Source, high-performance data base for online transactions -- typically small data sets sent to a server at rapid pace and in high volume. Volt keeps SQL and ACID and scales pretty much linearly up to silly cluster sizes. I did a benchmark using AWS EC2 recently, where I got 877,000 transactions/second, equalling 3.5M operations/second (3 reads, 1 write + bonus: 2 materialized view updates). For details see: http://blog.voltdb.com/877000-tps-with-erlang-and-voltdb/

The Erlvolt driver is the result of the hunt for a better database for heavy duty online-game servers. I experienced first hand what a pain it could be to try to scale MySQL and found VoltDB better suited for the requirements of more complex game worlds. Better than any other database in fact for games with free player interaction. To be able to use it with Erlang, I started creating the Erlang driver for VoltDB.

Giving it a whirl takes seconds, plus a few short minutes build time. Simply execute these lines to clone, build, and run a simple benchmark:

	git clone https://github.com/VoltDB/voltdb.git voltdb
	git clone https://github.com/Eonblast/Erlvolt.git erlvolt
	cd voltdb && ant && cd examples/voter && ./run.sh &
	cd erlvolt && make profile bench


Hello World
----------------

This is a hello world program. See the README.md for more. ( https://github.com/Eonblast/Erlvolt#Samples ) 

	-module(hello).
	-export([run/0]).
	
	-include("erlvolt.hrl").
	
	run() ->
	
	    crypto:start(),
	    application:start(erlvolt),
	
	    erlvolt:add_pool(hello_pool, [{"localhost", 21212}]),
	
	    erlvolt:call_procedure(hello_pool, "Insert", ["Hej", "världen", "Swedish"]),
	
	    Result = erlvolt:call_procedure(hello_pool, "Select", ["Swedish"]),
	
	    Table = erlvolt:get_table(Result, 1),
	    Row = erlvolt:get_row(Table, 1),
	    Hello = erlvolt:get_string(Row, Table, "HELLO"), 
	    World = erlvolt:get_string(Row, Table, "WORLD"),
	
	    io:format("~n~s ~s!~n~n", [Hello, World]),
	
	    erlvolt:close_pool(hello_pool).


Execution
-------------

The driver can serve multiple processes, using multiple connections and connection pools. Erlvolt can serve multiple pools in parallel.

Queries that are not implemented as stored procedures, so-called 'ad-hoc queries' are easily available with this driver, for tests and non-performance sensitive experimentation:

	 R = erlvolt:call_procedure(mypool, "@AdHoc", ["SELECT COUNT(*) AS cnt FROM votes"]),


If you find time, please let me know your feedback!

Thanks,

Henning


More information about the erlang-questions mailing list