Many architects and developers today are targeting Apache Cassandra as the underlying database because of its ability to easily scale and perform fast under extreme workloads. Developers like the fact that no modifications are required on their part if the application is initially written to just use one Cassandra node, but grows into hundreds in the future.
According to industry analysts such as Evans Data, Microsoft Windows remains the number one platform used by developers to write code and test their work (although Mac has recently been challenging that ranking). Many times developers need a complete environment to do their work, and this translates into having a full functioning copy of the database their application will target running on their Windows workstation or laptop.
For those wanting to develop against Apache Cassandra on Windows, this article will show you how to easily install, setup, and manage/monitor Apache Cassandra on a Windows machine.
The first step is to download the software you’ll need for your Windows machine. In the past, getting Apache Cassandra and all its utilities and management software on Windows wasn’t that easy, but that’s now a thing of the past since DataStax introduced its free Windows installer.
DataStax makes available the DataStax Community Edition, which contains the latest community version of Apache Cassandra, along with the Cassandra Query Language (CQL) utility, and a free edition of DataStax OpsCenter, which is the tool you’ll want to use for managing and monitoring your Cassandra cluster on Windows. To get Datastax Community Edition, go to the downloads page and select the Windows installation package for your version of Microsoft Windows. Note that 32 and 64-bit installers are offered.
The only prerequisites you’ll need for your Windows machine are:
The Windows installer is an MSI package that is run like any other on Windows. When you execute the setup program, you are first presented with an initial welcome panel that identifies your installation package:
Clicking next takes you to the end user license agreement (don’t worry, the software is free):
The next panel allows you to specify where the software is to be installed:
Once the installation directory has been set, the installer will ask how you want to handle the services that will be installed. Installed services include:
The next panel initiates the installation process:
The final panel asks if you would like to launch DataStax OpsCenter in your browser and also register to be updated when new versions of the software become available:
If you choose to execute DataStax OpsCenter (and you have either Google Chrome or Firefox as your default web browser), you’ll be presented with the OpsCenter dashboard:
You can find a number of the most used interfaces you’ll need in a Windows program group that the installer creates for you:
The primary interface into Cassandra is the CQL (Cassandra Query Language) shell utility, which can be used to create a new keyspace (analogous to a database in the RDBMS world) for the new Cassandra server:
Once a keyspace is created, you can create column families (the primary data object in Cassandra), insert data, query data, and more:
Typing, “Help;” at the CQL prompt will bring up the supported list of commands.
You can also use the Cassandra Command Line Interface (CLI) utility, which until the arrival of CQL was the primary interface used to create, manage, and query objects:
Another utility that’s used to perform various management tasks on Cassandra is the nodetool shell program. It’s not installed as a Windows program group item, and most of what it does can be visually performed through DataStax OpsCenter, but you can access it in the bin subdirectory that’s under the main installation directory:
Lastly, you can start, stop, and manage the various services installed via the standard Windows services control panel interface:
That’s all there is to it to get Apache Cassandra and the DataStax OpsCenter visual management and monitoring tool installed on your Windows machine. For other software such as application drivers, client libraries, and more visit the downloads page.