Skip to content

Commit dfcbecd

Browse files
committed
AUTO: Sync ScalarDL docs in English to docs site repo
1 parent 5e87cd2 commit dfcbecd

9 files changed

+171
-38
lines changed

docs/applications/simple-bank-account/conf/client.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Optional. A hostname or an IP address of the server. Use localhost by default if not specified.
2-
# It assuems that there is a single endpoint that is given by DNS or a load balancer.
2+
# It assumes that there is a single endpoint that is given by DNS or a load balancer.
33
scalar.dl.client.server.host=localhost
44

55
# Optional. A port number of the server. Use 50051 by default if not specified.

docs/getting-started.mdx

Lines changed: 163 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,174 @@ displayed_sidebar: docsEnglish
88
import Tabs from '@theme/Tabs';
99
import TabItem from '@theme/TabItem';
1010
import JavadocLink from "/src/theme/JavadocLink.js";
11-
import StartupLedger from '/src/components/en-us/_getting-started-startup-ledger.mdx';
11+
import DbSpecificSteps from '/src/components/en-us/_getting-started-db-specific-steps.mdx';
1212

1313
# Get Started with ScalarDL Ledger
1414

1515
This getting started tutorial explains how to configure ScalarDL on your preferred database and illustrates the process of creating a simple application where the historical states of data are traced.
1616

17-
<StartupLedger />
17+
## Prerequisites
18+
19+
- One of the following Java Development Kits (JDKs):
20+
- **[Oracle JDK](https://www.oracle.com/java/):** 8, 11, 17, or 21 (LTS versions)
21+
- **[OpenJDK](https://openjdk.org/) ([Eclipse Temurin](https://adoptium.net/temurin/), [Amazon Corretto](https://aws.amazon.com/corretto/), or [Microsoft Build of OpenJDK](https://learn.microsoft.com/en-us/java/openjdk/)):** 8, 11, 17, or 21 (LTS versions)
22+
- [Docker](https://www.docker.com/get-started/) 20.10 or later with [Docker Compose](https://docs.docker.com/compose/install/) v2.20.0 or later
23+
24+
:::warning
25+
26+
Since ScalarDL is built with JDK 8, contracts must be a JDK 8–compatible binary. If you use a version other than JDK 8, you must configure your build tool to build the JDK 8–compatible binary. There are several ways to specify binary compatibility, including using the `--release 8` option for javac or setting Gradle or Maven configurations to use the JDK 8 toolchain. The following shows the configuration for Gradle:
27+
28+
```gradle
29+
java {
30+
toolchain {
31+
languageVersion.set(JavaLanguageVersion.of(8))
32+
}
33+
}
34+
```
35+
36+
For more details about the Gradle and Maven configurations, see [Toolchains for JVM projects for Gradle](https://docs.gradle.org/current/userguide/toolchains.html) and [Guide to Using Toolchains for Maven](https://maven.apache.org/guides/mini/guide-using-toolchains.html).
37+
38+
:::
39+
40+
## Clone the ScalarDL samples repository
41+
42+
Open **Terminal**, then clone the ScalarDL samples repository by running the following command:
43+
44+
```console
45+
git clone https://github.com/scalar-labs/scalardl-samples
46+
```
47+
48+
Then, go to the directory that contains the sample configuration by running the following command:
49+
50+
```console
51+
cd scalardl-samples
52+
```
53+
54+
## Start up ScalarDL with your preferred database
55+
56+
Select your database, and follow the instructions to deploy ScalarDL Ledger with it. For a list of databases that ScalarDL supports, see [Databases](requirements.mdx#databases).
57+
58+
<Tabs groupId="databases" queryString>
59+
<TabItem value="mysql" label="MySQL" default>
60+
<DbSpecificSteps productName="MySQL" shortName="mysql" />
61+
</TabItem>
62+
63+
<TabItem value="postgres" label="PostgreSQL">
64+
<DbSpecificSteps productName="PostgreSQL" shortName="postgres" />
65+
</TabItem>
66+
67+
<TabItem value="oracle" label="Oracle Database">
68+
<DbSpecificSteps productName="Oracle Database" shortName="oracle" />
69+
</TabItem>
70+
71+
<TabItem value="sqlserver" label="SQL Server">
72+
<DbSpecificSteps productName="SQL Server" shortName="sqlserver" />
73+
</TabItem>
74+
75+
<TabItem value="dynamodb" label="DynamoDB">
76+
<DbSpecificSteps productName="DynamoDB" shortName="dynamodb" />
77+
</TabItem>
78+
79+
<TabItem value="cosmosdb" label="Cosmos DB for NoSQL">
80+
81+
<h3>Set up your license (Enterprise edition only)</h3>
82+
83+
If you're using the ScalarDL Enterprise edition, set up your license as follows. If you're using the Community edition, skip to the next section to start up ScalarDL.
84+
85+
<details>
86+
<summary>See here to set up your license</summary>
87+
88+
1. Enable the Docker image for the Enterprise edition in the `cosmosdb/docker-compose-ledger.yml` file as follows:
89+
90+
- Before changing the image (default configuration):
91+
92+
```yaml
93+
services:
94+
scalardl-ledger:
95+
image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
96+
# image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION}
97+
```
98+
99+
- After changing the image:
100+
101+
```yaml
102+
services:
103+
scalardl-ledger:
104+
# image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
105+
image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION}
106+
```
107+
108+
2. Set your license key for ScalarDL Ledger. In the `cosmosdb/ledger.properties` file, replace `<SET_YOUR_LICENSE_KEY>` with your license key. For example:
109+
110+
```properties
111+
##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) #####
112+
scalar.dl.licensing.license_key={"organization_name":"XXXXXXXX","expiration_date_time":"YYYY-MM-DDTHH:mm:SS+TIMEZONE","product_name":"ScalarDL Ledger","product_version":N,"license_type":"trial","signature":"XXXXXXXX"}
113+
##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) #####
114+
```
115+
116+
3. To check the license, update the `cosmosdb/docker-compose-ledger.yml` file as follows. If you're using a trial license, skip this step.
117+
118+
- Before changing the certificate file path (default configuration):
119+
120+
```yaml
121+
services:
122+
scalardl-ledger:
123+
volumes:
124+
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
125+
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
126+
- ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
127+
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
128+
# - ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem
129+
```
130+
131+
- After changing the certificate file path:
132+
133+
```yaml
134+
services:
135+
scalardl-ledger:
136+
volumes:
137+
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
138+
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
139+
# - ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
140+
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
141+
- ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem
142+
```
143+
144+
</details>
145+
146+
<h3>Start up ScalarDL</h3>
147+
148+
You can start using ScalarDL Ledger by following the steps below:
149+
150+
1. Configure Cosmos DB for NoSQL.
151+
152+
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).
153+
154+
After setting up Cosmos DB for NoSQL, modify the following items in `cosmodb/ledger.properties` based on your configuration of Cosmos DB for NoSQL.
155+
156+
```properties
157+
scalar.db.contact_points=<COSMOS_DB_FOR_NOSQL_URI>
158+
scalar.db.password=<COSMOS_DB_FOR_NOSQL_KEY>
159+
```
160+
161+
2. Load the database schema for ScalarDL Ledger by running the following command:
162+
163+
```console
164+
docker compose -f cosmosdb/docker-compose-ledger.yml up -d scalardl-ledger-schema-loader
165+
```
166+
167+
3. Run ScalarDL Ledger by running the following command:
168+
169+
```console
170+
docker compose -f cosmosdb/docker-compose-ledger.yml up -d
171+
```
172+
</TabItem>
173+
174+
<TabItem value="cassandra" label="Cassandra">
175+
<DbSpecificSteps productName="Cassandra" shortName="cassandra" />
176+
</TabItem>
177+
178+
</Tabs>
18179

19180
## Download the Client SDK
20181

docs/how-to-run-applications-with-auditor.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ Because Auditor does not rely on the Consensus Commit transaction manager, you d
103103
While ScalarDL leverages ScalarDB, the following ScalarDB features are not compatible with the consistency guarantee mechanism of ScalarDL:
104104

105105
- [Group commit for the Coordinator table](https://scalardb.scalar-labs.com/docs/latest/api-guide/#group-commit-for-the-coordinator-table) (`scalar.db.consensus_commit.coordinator.group_commit.enabled` must be `false`.)
106-
- Coordinator write omission optimization in [Performance-related configurations](https://scalardb.scalar-labs.com/docs/latest/configurations#performance-related-configurations) (`scalar.db.consensus_commit.coordinator.write_omission_on_read_only.enabled` must be `false`.)
107106

108107
### Decide which other configurations to use
109108

docs/how-to-run-applications.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,9 @@ You can configure the isolation level of Ledger as follows. If you are unsure ab
8181

8282
#### Limitations
8383

84-
While ScalarDL leverages ScalarDB, the following ScalarDB features are not compatible with the consistency guarantee mechanism of ScalarDL:
84+
While ScalarDL leverages ScalarDB, the following ScalarDB feature is not compatible with the consistency guarantee mechanism of ScalarDL:
8585

8686
- [Group commit for the Coordinator table](https://scalardb.scalar-labs.com/docs/latest/api-guide/#group-commit-for-the-coordinator-table) (`scalar.db.consensus_commit.coordinator.group_commit.enabled` must be `false`.)
87-
- Coordinator write omission optimization in [Performance-related configurations](https://scalardb.scalar-labs.com/docs/latest/configurations#performance-related-configurations) (`scalar.db.consensus_commit.coordinator.write_omission_on_read_only.enabled` must be `false`.)
8887

8988
### Decide which other configurations to use
9089

docs/quickstart-overview.mdx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,6 @@ displayed_sidebar: docsEnglish
77

88
# Quickstart Overview
99

10-
In this category, you can follow quickstart tutorials for how to get started with ScalarDL.
10+
In this category, you can follow quickstart tutorials for how to get started with running a basic contract through ScalarDL Ledger by using the Java Client SDK.
1111

12-
ScalarDL offers two abstracted data stores for easy, seamless interaction with the ledger: HashStore and TableStore.
13-
14-
* HashStore provides interfaces for ensuring the authenticity of objects and collections, making it ideal for chain-of-custody and similar applications.
15-
* TableStore offers an SQL-compatible interface for verifying table authenticity, enabling developers to build versatile, tamper-evident applications with familiar data models and interfaces.
16-
17-
To get started, refer to the following guides:
18-
19-
* [Get Started with ScalarDL HashStore](getting-started-hashstore.mdx)
20-
* [Get Started with ScalarDL TableStore](getting-started-tablestore.mdx)
21-
22-
ScalarDL also includes primitive interfaces for more customized interactions with the ledger. To explore this approach, see [Get Started with ScalarDL Ledger](getting-started.mdx).
12+
To get started, see [Run a Contract Through ScalarDL Ledger](getting-started.mdx).

docs/scalardl-auditor-status-codes.mdx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,7 @@ The specified asset is not found.
125125
**Message**
126126

127127
```markdown
128-
Authentication between Ledger and Auditor is not correctly configured. Set %s along with a private key with %s or %s if you use digital signature authentication.
129-
```
130-
131-
### `DL-AUDITOR-414003`
132-
133-
**Message**
134-
135-
```markdown
136-
Authentication between Ledger and Auditor is not correctly configured. Set %s if you use HMAC authentication.
128+
Authentication between Ledger and Auditor is not correctly configured. Set %s or set %s along with a private key with %s or %s.
137129
```
138130

139131
## `DL-AUDITOR-5xxxx` status codes

docs/scalardl-client-status-codes.mdx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,3 @@ Shutting down the channel failed. Details: %s
260260
```markdown
261261
Processing JSON failed. Details: %s
262262
```
263-
264-
### `DL-CLIENT-502005`
265-
266-
**Message**
267-
268-
```markdown
269-
Failed to load the class file. File: %s
270-
```

docs/scalardl-common-status-codes.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ The private key and certificate are required.
278278
**Message**
279279

280280
```markdown
281-
The certificate version must be greater than zero.
281+
The certificate version must be greater than or equal to zero.
282282
```
283283

284284
### `DL-COMMON-414011`
@@ -294,7 +294,7 @@ A secret key is required for HMAC authentication.
294294
**Message**
295295

296296
```markdown
297-
The secret version for HMAC authentication must be greater than zero.
297+
The secret version for HMAC authentication must be greater than or equal to zero.
298298
```
299299

300300
### `DL-COMMON-414013`

docs/scalardl-ledger-status-codes.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ The database operation in the function failed. Details: %s
190190
**Message**
191191

192192
```markdown
193-
Authentication between Ledger and Auditor is not correctly configured. Set a private key with %s or %s if you use digital signature authentication with Auditor enabled.
193+
Authentication between Ledger and Auditor is not correctly configured. Set %s or set a private key with %s or %s.
194194
```
195195

196196
### `DL-LEDGER-414004`

0 commit comments

Comments
 (0)