Getting Started with ScalarDB on Cassandra
Overview
This document briefly explains how you can get started with ScalarDB on Cassandra with a simple electronic money application.
Install prerequisites
ScalarDB is written in Java and uses Cassandra as an underlying storage implementation, so the following software is required to run it.
- Oracle JDK 8 (OpenJDK 8) or higher
- Casssandra 3.11.x (the current stable version as of writing)
- Take a look at this document for how to set up Cassandra.
- Change
commitlog_sync
fromperiodic
tobatch
incassandra.yaml
not to lose data when quorum of replica nodes go down
- Other libraries used from the above are automatically installed through gradle
From here, we assume Oracle JDK 8 and Cassandra 3.11.x are properly installed in your local environment, and Cassandra is running in your localhost.
Configure ScalarDB
The scalardb.properties (getting-started/scalardb.properties) file holds the configuration for ScalarDB. Basically, it describes the Cassandra installation that will be used.
# Comma separated contact points
scalar.db.contact_points=localhost
# Port number for all the contact points. Default port number for each database is used if empty.
scalar.db.contact_port=9042
# Credential information to access the database
scalar.db.username=cassandra
scalar.db.password=cassandra
# Storage implementation. Either cassandra or cosmos or dynamo or jdbc can be set. Default storage is cassandra.
#scalar.db.storage=cassandra
Please follow Getting Started with ScalarDB to run the application.