Forum: Building VoltDB Applications

Post: New Example Application : Key-Value in VoltDB

New Example Application : Key-Value in VoltDB
tcallaghan
May 4, 2010
You can download the application from here.

It will be included with all the other example applications in our next release.


IMPORTANT: this application requires VoltDB v0.9.01 or above.

====================================================================================
This example application demonstrates how to create a "Key-Value" in VoltDB.

Many attributes of the application are customizable through arguments passed to the client, including:

- The maximum number of transactions the client will attempt per second
- How long the sample client runs
- When to start recording performance statistics
- How frequently to report those statistics
- "Key" size
- Minimum and Maximum "Value" size (Value sizes will be randomly distributed between min and max)
- Percentage of transactions that are "Gets" (out of 100%, the rest are "Puts")
- Whether or not to initialize the database (load the initial state before benchmarking)


These attributes can be adjusted by modifying the arguments to the "client" and "client-init" targets in the Ant build script.

As delivered, the "Value" is uncompressible and is therefore only base64 encoded before storage. There is code in the client
application, ClientKV.java, to change this to be compressible.


Increasing the total number of servers or number of partitions on a server may not improve the performance of your VoltDB cluster for this application.

Keep an eye on your client bandwidth to see if you are consuming all your available network bandwidth.


Tech Notes:
- The Key-Value client application supports rate control (the number of transactions per second to send to the servers), this can be modified in the build.xml file.
- The Key-Value client application also records/reports latency.
- The Key-Value client application also records/reports client network throughput.


Important Notes:
- runs on VoltDB v0.9.01 and above.
- must be installed into your kit's "examples" folder (alongside "auction", "helloworld", "satellite", and "voter") to run as-is.
- modify location of voltdb*.jar and "-Djava.library.path" to run from other locations.