This application simulates a simple position keeper applicaton that maintains the positions of portfolios that are updated frequently as trades and price changes occur.
The code is divided into two projects:
See below for instructions on running these applications. For any questions, please contact firstname.lastname@example.org.
Before running these scripts you need to have VoltDB 4.0 (Enterprise or Community) or later installed, and you should add the voltdb-$(VERSION)/bin directory to your PATH environment variable, for example:
Start the database in the background
Run the client application
Note: this client can only be run once, not repeatedly, or it will stop with unique constraint violations. To run it again, the database needs to be stopped and restarted, or all of the tables need to be truncated.
To stop the database and clean up temp files
voltadmin shutdown ./clean.sh
You can control various characteristics of the demo by modifying the parameters passed into the InvestmentBenchmark java application in the run_client.sh script.
Speed & Duration:
--duration=120 (benchmark duration in seconds) --autotune=true (true = ignore rate limit, run at max throughput until latency is impacted) (false = run at the specified rate limit) --ratelimit=20000 (when autotune=false, run up to this rate of requests/second)
Use case parameters:
--traders=1000 (number of traders) --secpercnt=10 (number of securities each trader has in their portfolio)
Before running this demo on a cluster, make the following changes:
On each server, edit the start_db_cluster.sh file to set the HOST variable to the name of the first server in the cluster:
On each server, edit db/deployment-cluster.xml to set hostcount to the correct number of servers:
Also, in the same file, set the voltdbroot path to an appropriate path for your servers.
On each server, run the start script:
On one server, Edit the run_client.sh script to set the SERVERS variable to a comma-separated list of the servers in the cluster
Run the client script: