Skip to content

Commit

Permalink
Add updated doc (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-wong authored Jul 11, 2024
1 parent 44323c6 commit cb763bc
Show file tree
Hide file tree
Showing 24 changed files with 661 additions and 661 deletions.
122 changes: 61 additions & 61 deletions docs/getting-started-with-scalardb-by-using-kotlin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ The electronic money application is simplified for this tutorial and isn't suita

Because ScalarDB is written in Java, you must have one of the following Java Development Kits (JDKs) installed in your environment:

- [Oracle JDK](https://www.oracle.com/java/technologies/downloads/) LTS version (8, 11, or 17)
- [OpenJDK](https://openjdk.org/install/) LTS version (8, 11, or 17)
- [Oracle JDK](https://www.oracle.com/java/technologies/downloads/) LTS version (8, 11, 17 or 21)
- OpenJDK LTS version (8, 11, 17, or 21) from [Eclipse Temurin](https://adoptium.net/temurin/releases/), [Amazon Corretto](https://aws.amazon.com/corretto/), or [Microsoft](https://learn.microsoft.com/en-us/java/openjdk/download)

:::note

Expand Down Expand Up @@ -47,47 +47,71 @@ Select your database, and follow the instructions to configure it for ScalarDB.
For a list of databases that ScalarDB supports, see [Supported Databases](scalardb-supported-databases.mdx).

<Tabs groupId="databases" queryString>
<TabItem value="Cassandra" label="Cassandra" default>
Confirm that you have Cassandra installed. If Cassandra isn't installed, visit [Downloading Cassandra](https://cassandra.apache.org/_/download.html).
<TabItem value="JDBC_databases" label="JDBC databases" default>
Confirm that you have a JDBC database installed. For a list of supported JDBC databases, see [Supported Databases](scalardb-supported-databases.mdx).

### Configure Cassandra
<h3>Configure ScalarDB</h3>

Open **cassandra.yaml** in your preferred IDE. Then, change `commitlog_sync` from `periodic` to `batch` so that you don't lose data if a quorum of replica nodes goes down.
The following instructions assume that you have properly installed and configured the JDK and JDBC database in your local environment, and the JDBC database is running on your localhost.

### Configure ScalarDB
The **scalardb.properties** file in the `docs/getting-started-kotlin` directory holds database configurations for ScalarDB. The following is a basic configuration for JDBC databases.

The following instructions assume that you have properly installed and configured the JDK and Cassandra in your local environment, and Cassandra is running on your localhost.
:::note

The **scalardb.properties** file in the `docs/getting-started-kotlin` directory holds database configurations for ScalarDB. The following is a basic configuration for Cassandra. Be sure to change the values for `scalar.db.username` and `scalar.db.password` as described.
Be sure to uncomment the `scalar.db.contact_points` variable and change the value of the JDBC database you are using, and change the values for `scalar.db.username` and `scalar.db.password` as described.

```properties
# The Cassandra storage implementation is used for Consensus Commit.
scalar.db.storage=cassandra
:::

# Comma-separated contact points.
scalar.db.contact_points=localhost
```properties
# The JDBC database storage implementation is used for Consensus Commit.
scalar.db.storage=jdbc

# The port number for all the contact points.
scalar.db.contact_port=9042
# The JDBC database URL for the type of database you are using.
# scalar.db.contact_points=jdbc:mysql://localhost:3306/
# scalar.db.contact_points=jdbc:oracle:thin:@//localhost:1521/
# scalar.db.contact_points=jdbc:postgresql://localhost:5432/
# scalar.db.contact_points=jdbc:sqlserver://localhost:1433;
# scalar.db.contact_points=jdbc:sqlite://localhost:3306.sqlite3?busy_timeout=10000

# The username and password to access the database.
# The username and password for connecting to the database.
scalar.db.username=<USER_NAME>
scalar.db.password=<USER_PASSWORD>
scalar.db.password=<PASSWORD>
```
</TabItem>
<TabItem value="DynamoDB" label="DynamoDB">
To use Amazon DynamoDB, you must have an AWS account. If you don't have an AWS account, visit [Getting started: Are you a first-time AWS user?](https://docs.aws.amazon.com/accounts/latest/reference/welcome-first-time-user.html).
<h3>Configure ScalarDB</h3>
The following instructions assume that you have properly installed and configured the JDK in your local environment.
The **scalardb.properties** file in the `docs/getting-started-kotlin` directory holds database configurations for ScalarDB. Be sure to change the values for `scalar.db.contact_points`, `scalar.db.username`, and `scalar.db.password` as described.
```properties
# The DynamoDB storage implementation is used for Consensus Commit.
scalar.db.storage=dynamo
# The AWS region.
scalar.db.contact_points=<REGION>
# The AWS access key ID and secret access key to access the database.
scalar.db.username=<ACCESS_KEY_ID>
scalar.db.password=<SECRET_ACCESS_KEY>
```
</TabItem>
<TabItem value="Cosmos_DB_for_NoSQL" label="Cosmos DB for NoSQL">
To use Azure Cosmos DB for NoSQL, you must have an Azure account. If you don't have an Azure account, visit [Create an Azure Cosmos DB account](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/quickstart-portal#create-account).

### Configure Cosmos DB for NoSQL
<h3>Configure Cosmos DB for NoSQL</h3>

Set the **default consistency level** to **Strong** according to the official document at [Configure the default consistency level](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-manage-consistency#configure-the-default-consistency-level).

### Configure ScalarDB
<h3>Configure ScalarDB</h3>

The following instructions assume that you have properly installed and configured the JDK in your local environment and properly configured your Cosmos DB for NoSQL account in Azure.

The **scalardb.properties** file in the `docs/getting-started-kotlin` directory holds database configurations for ScalarDB. Be sure to change the values for `scalar.db.contact_points` and `scalar.db.password` as described.
```properties
# The Cosmos DB for NoSQL storage implementation is used for Consensus Commit.
scalar.db.storage=cosmos
Expand All @@ -105,56 +129,32 @@ You can use a primary key or a secondary key as the value for `scalar.db.passwor

:::
</TabItem>
<TabItem value="DynamoDB" label="DynamoDB">
To use Amazon DynamoDB, you must have an AWS account. If you don't have an AWS account, visit [Getting started: Are you a first-time AWS user?](https://docs.aws.amazon.com/accounts/latest/reference/welcome-first-time-user.html).

### Configure ScalarDB

The following instructions assume that you have properly installed and configured the JDK in your local environment.

The **scalardb.properties** file in the `docs/getting-started-kotlin` directory holds database configurations for ScalarDB. Be sure to change the values for `scalar.db.contact_points`, `scalar.db.username`, and `scalar.db.password` as described.

```properties
# The DynamoDB storage implementation is used for Consensus Commit.
scalar.db.storage=dynamo

# The AWS region.
scalar.db.contact_points=<REGION>

# The AWS access key ID and secret access key to access the database.
scalar.db.username=<ACCESS_KEY_ID>
scalar.db.password=<SECRET_ACCESS_KEY>
```
</TabItem>
<TabItem value="JDBC_databases" label="JDBC databases">
Confirm that you have a JDBC database installed. For a list of supported JDBC databases, see [Supported Databases](scalardb-supported-databases.mdx).

### Configure ScalarDB
<TabItem value="Cassandra" label="Cassandra">
Confirm that you have Cassandra installed. If Cassandra isn't installed, visit [Downloading Cassandra](https://cassandra.apache.org/_/download.html).
The following instructions assume that you have properly installed and configured the JDK and JDBC database in your local environment, and the JDBC database is running on your localhost.
<h3>Configure Cassandra</h3>
The **scalardb.properties** file in the `docs/getting-started-kotlin` directory holds database configurations for ScalarDB. The following is a basic configuration for JDBC databases.
Open **cassandra.yaml** in your preferred IDE. Then, change `commitlog_sync` from `periodic` to `batch` so that you don't lose data if a quorum of replica nodes goes down.

:::note
<h3>Configure ScalarDB</h3>

Be sure to uncomment the `scalar.db.contact_points` variable and change the value of the JDBC database you are using, and change the values for `scalar.db.username` and `scalar.db.password` as described.
The following instructions assume that you have properly installed and configured the JDK and Cassandra in your local environment, and Cassandra is running on your localhost.

:::
The **scalardb.properties** file in the `docs/getting-started-kotlin` directory holds database configurations for ScalarDB. The following is a basic configuration for Cassandra. Be sure to change the values for `scalar.db.username` and `scalar.db.password` as described.

```properties
# The JDBC database storage implementation is used for Consensus Commit.
scalar.db.storage=jdbc
# The Cassandra storage implementation is used for Consensus Commit.
scalar.db.storage=cassandra

# The JDBC database URL for the type of database you are using.
# scalar.db.contact_points=jdbc:mysql://localhost:3306/
# scalar.db.contact_points=jdbc:oracle:thin:@//localhost:1521/
# scalar.db.contact_points=jdbc:postgresql://localhost:5432/
# scalar.db.contact_points=jdbc:sqlserver://localhost:1433;
# scalar.db.contact_points=jdbc:sqlite://localhost:3306.sqlite3?busy_timeout=10000
# Comma-separated contact points.
scalar.db.contact_points=localhost

# The username and password for connecting to the database.
# The port number for all the contact points.
scalar.db.contact_port=9042

# The username and password to access the database.
scalar.db.username=<USER_NAME>
scalar.db.password=<PASSWORD>
scalar.db.password=<USER_PASSWORD>
```
</TabItem>
</Tabs>
Expand Down
120 changes: 60 additions & 60 deletions docs/getting-started-with-scalardb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ The electronic money application is simplified for this tutorial and isn't suita

Because ScalarDB is written in Java, you must have one of the following Java Development Kits (JDKs) installed in your environment:

- [Oracle JDK](https://www.oracle.com/java/technologies/downloads/) LTS version (8, 11, or 17)
- [OpenJDK](https://openjdk.org/install/) LTS version (8, 11, or 17)
- [Oracle JDK](https://www.oracle.com/java/technologies/downloads/) LTS version (8, 11, 17 or 21)
- OpenJDK LTS version (8, 11, 17, or 21) from [Eclipse Temurin](https://adoptium.net/temurin/releases/), [Amazon Corretto](https://aws.amazon.com/corretto/), or [Microsoft](https://learn.microsoft.com/en-us/java/openjdk/download)

:::note

Expand Down Expand Up @@ -47,42 +47,66 @@ Select your database, and follow the instructions to configure it for ScalarDB.
For a list of databases that ScalarDB supports, see [Supported Databases](scalardb-supported-databases.mdx).

<Tabs groupId="databases" queryString>
<TabItem value="Cassandra" label="Cassandra" default>
Confirm that you have Cassandra installed. If Cassandra isn't installed, visit [Downloading Cassandra](https://cassandra.apache.org/_/download.html).
<TabItem value="JDBC_databases" label="JDBC databases" default>
Confirm that you have a JDBC database installed. For a list of supported JDBC databases, see [Supported Databases](scalardb-supported-databases.mdx).

### Configure Cassandra
<h3>Configure ScalarDB</h3>

Open **cassandra.yaml** in your preferred IDE. Then, change `commitlog_sync` from `periodic` to `batch` so that you don't lose data if a quorum of replica nodes goes down.
The following instructions assume that you have properly installed and configured the JDK and JDBC database in your local environment, and the JDBC database is running on your localhost.

### Configure ScalarDB
The **scalardb.properties** file in the `docs/getting-started` directory holds database configurations for ScalarDB. The following is a basic configuration for JDBC databases.

The following instructions assume that you have properly installed and configured the JDK and Cassandra in your local environment, and Cassandra is running on your localhost.
:::note

The **scalardb.properties** file in the `docs/getting-started` directory holds database configurations for ScalarDB. The following is a basic configuration for Cassandra. Be sure to change the values for `scalar.db.username` and `scalar.db.password` as described.
Be sure to uncomment the `scalar.db.contact_points` variable and change the value of the JDBC database you are using, and change the values for `scalar.db.username` and `scalar.db.password` as described.

```properties
# The Cassandra storage implementation is used for Consensus Commit.
scalar.db.storage=cassandra
:::

# Comma-separated contact points.
scalar.db.contact_points=localhost
```properties
# The JDBC database storage implementation is used for Consensus Commit.
scalar.db.storage=jdbc

# The port number for all the contact points.
scalar.db.contact_port=9042
# The JDBC database URL for the type of database you are using.
# scalar.db.contact_points=jdbc:mysql://localhost:3306/
# scalar.db.contact_points=jdbc:oracle:thin:@//localhost:1521/
# scalar.db.contact_points=jdbc:postgresql://localhost:5432/
# scalar.db.contact_points=jdbc:sqlserver://localhost:1433;
# scalar.db.contact_points=jdbc:sqlite://localhost:3306.sqlite3?busy_timeout=10000

# The username and password to access the database.
# The username and password for connecting to the database.
scalar.db.username=<USER_NAME>
scalar.db.password=<USER_PASSWORD>
scalar.db.password=<PASSWORD>
```
</TabItem>
<TabItem value="DynamoDB" label="DynamoDB">
To use Amazon DynamoDB, you must have an AWS account. If you don't have an AWS account, visit [Getting started: Are you a first-time AWS user?](https://docs.aws.amazon.com/accounts/latest/reference/welcome-first-time-user.html).
<h3>Configure ScalarDB</h3>
The following instructions assume that you have properly installed and configured the JDK in your local environment.
The **scalardb.properties** file in the `docs/getting-started` directory holds database configurations for ScalarDB. Be sure to change the values for `scalar.db.contact_points`, `scalar.db.username`, and `scalar.db.password` as described.
```properties
# The DynamoDB storage implementation is used for Consensus Commit.
scalar.db.storage=dynamo
# The AWS region.
scalar.db.contact_points=<REGION>
# The AWS access key ID and secret access key to access the database.
scalar.db.username=<ACCESS_KEY_ID>
scalar.db.password=<SECRET_ACCESS_KEY>
```
</TabItem>
<TabItem value="Cosmos_DB_for_NoSQL" label="Cosmos DB for NoSQL">
To use Azure Cosmos DB for NoSQL, you must have an Azure account. If you don't have an Azure account, visit [Create an Azure Cosmos DB account](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/quickstart-portal#create-account).

### Configure Cosmos DB for NoSQL
<h3>Configure Cosmos DB for NoSQL</h3>

Set the **default consistency level** to **Strong** according to the official document at [Configure the default consistency level](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-manage-consistency#configure-the-default-consistency-level).

### Configure ScalarDB
<h3>Configure ScalarDB</h3>

The following instructions assume that you have properly installed and configured the JDK in your local environment and properly configured your Cosmos DB for NoSQL account in Azure.

Expand All @@ -105,56 +129,32 @@ You can use a primary key or a secondary key as the value for `scalar.db.passwor

:::
</TabItem>
<TabItem value="DynamoDB" label="DynamoDB">
To use Amazon DynamoDB, you must have an AWS account. If you don't have an AWS account, visit [Getting started: Are you a first-time AWS user?](https://docs.aws.amazon.com/accounts/latest/reference/welcome-first-time-user.html).

### Configure ScalarDB

The following instructions assume that you have properly installed and configured the JDK in your local environment.

The **scalardb.properties** file in the `docs/getting-started` directory holds database configurations for ScalarDB. Be sure to change the values for `scalar.db.contact_points`, `scalar.db.username`, and `scalar.db.password` as described.

```properties
# The DynamoDB storage implementation is used for Consensus Commit.
scalar.db.storage=dynamo

# The AWS region.
scalar.db.contact_points=<REGION>

# The AWS access key ID and secret access key to access the database.
scalar.db.username=<ACCESS_KEY_ID>
scalar.db.password=<SECRET_ACCESS_KEY>
```
</TabItem>
<TabItem value="JDBC_databases" label="JDBC databases">
Confirm that you have a JDBC database installed. For a list of supported JDBC databases, see [Supported Databases](scalardb-supported-databases.mdx).

### Configure ScalarDB
<TabItem value="Cassandra" label="Cassandra">
Confirm that you have Cassandra installed. If Cassandra isn't installed, visit [Downloading Cassandra](https://cassandra.apache.org/_/download.html).
The following instructions assume that you have properly installed and configured the JDK and JDBC database in your local environment, and the JDBC database is running on your localhost.
<h3>Configure Cassandra</h3>
The **scalardb.properties** file in the `docs/getting-started` directory holds database configurations for ScalarDB. The following is a basic configuration for JDBC databases.
Open **cassandra.yaml** in your preferred IDE. Then, change `commitlog_sync` from `periodic` to `batch` so that you don't lose data if a quorum of replica nodes goes down.

:::note
<h3>Configure ScalarDB</h3>

Be sure to uncomment the `scalar.db.contact_points` variable and change the value of the JDBC database you are using, and change the values for `scalar.db.username` and `scalar.db.password` as described.
The following instructions assume that you have properly installed and configured the JDK and Cassandra in your local environment, and Cassandra is running on your localhost.

:::
The **scalardb.properties** file in the `docs/getting-started` directory holds database configurations for ScalarDB. The following is a basic configuration for Cassandra. Be sure to change the values for `scalar.db.username` and `scalar.db.password` as described.

```properties
# The JDBC database storage implementation is used for Consensus Commit.
scalar.db.storage=jdbc
# The Cassandra storage implementation is used for Consensus Commit.
scalar.db.storage=cassandra

# The JDBC database URL for the type of database you are using.
# scalar.db.contact_points=jdbc:mysql://localhost:3306/
# scalar.db.contact_points=jdbc:oracle:thin:@//localhost:1521/
# scalar.db.contact_points=jdbc:postgresql://localhost:5432/
# scalar.db.contact_points=jdbc:sqlserver://localhost:1433;
# scalar.db.contact_points=jdbc:sqlite://localhost:3306.sqlite3?busy_timeout=10000
# Comma-separated contact points.
scalar.db.contact_points=localhost

# The username and password for connecting to the database.
# The port number for all the contact points.
scalar.db.contact_port=9042

# The username and password to access the database.
scalar.db.username=<USER_NAME>
scalar.db.password=<PASSWORD>
scalar.db.password=<USER_PASSWORD>
```
</TabItem>
</Tabs>
Expand Down
Loading

0 comments on commit cb763bc

Please sign in to comment.