![]() | ![]() | contents |
Now that you have recompiled your application catalog, it is possible to create a new database immediately, as you did when testing the original schema in Section 3.4, “Testing the Database”. By default, VoltDB uses a basic configuration starting the database using a single node on your current system. However, it is possible to start the database on a cluster, specifying different options and features for the database to use.
The application catalog defines the logical structure of the database. When you start the actual database process, you can specify the physical layout using a deployment configuration file. Although it is not needed in the simple case, let's create one now to familiarize ourselves with some of the more important options that are available to you.
The deployment file is an XML file that can be created with any text editor. It describes the size and configuration of the cluster that the database will run on, including:
The number of servers that will be used
The number of sites per server
In the deployment file, the root element is the <deployment> tag, and the
basic information is specified as attributes of the <cluster> element. For the
purposes of the Hello World application, we will define a cluster using just the current machine (that is, one node) and two
partitions. Use your text editor to create a new file called deployment.xml and enter the following text:
<?xml version="1.0"?>
<deployment>
<cluster hostcount="1"
sitesperhost="2"
/>
<httpd enabled="true">
<jsonapi enabled="true" />
</httpd>
</deployment>The deployment file can be used to enable and configure several other features of a VoltDB database. For example, in the deployment file you just created, it enables the HTTP and JSON interfaces. Other features that you can control with the deployment file are described in more detail in Using VoltDB. But for now, we will focus on the basics. Save and close your file and you are ready to run your application.
The Tao of VoltDB
The 5 Principles of VoltDB
VoltDB Technosphere
Products and Solutions
Technical Support
Key Features
Download VoltDB
No Limits
VoltDB Application Gallery
Infinite Possibilities
VoltBuilder Program
