Learn By Example: Voter

Process High-Speed Transactions Effortlessly


The Voter example application simulates a phone-based voting system, as you might find on popular television programs. People (based on phone numbers generated randomly by the client application) provide a steady stream of "votes" for a set of candidates.

The voter application shows how easily VoltDB handles large volumes of transactions and, through partitioning, can scale linearly by adding nodes to the cluster. It includes a "dashboard" showing how you can visualize the distribution of votes in real time.


You can customize many aspects of the application through arguments passed to the client, including:

  • The number of contestants (between 1 and 12)
  • How many votes are allowed per telephone number
  • How long the sample client runs
  • The maximum number of transactions the client will attempt per second
  • When to start recording performance statistics
  • How frequently to report those statistics

The application also includes clients written to demonstrate different approaches to calling VoltDB, including synchronous and asynchronous calls, as well as using the JDBC interface.

Running the Voter application


The code for the Voter sample application ships as part of the VoltDB product in the /examples folder. You can also find it in the VoltDB github repository.