Skip to content

Commit 1cb2e66

Browse files
AUTO: Docs repo sync - ScalarDL (#750)
* AUTO: Sync ScalarDL docs in English to docs site repo * Delete README.mdx * Delete sdks.mdx * Remove SDK section and SDK doc The Java Client SDK doc doesn't provide much value and the contents have recently been referenced in other docs, so it along with the SDK section can be removed for now. --------- Co-authored-by: josh-wong <joshua.wong@scalar-labs.com> Co-authored-by: Josh Wong <23216828+josh-wong@users.noreply.github.com>
1 parent abc7ce3 commit 1cb2e66

File tree

6 files changed

+10
-78
lines changed

6 files changed

+10
-78
lines changed

versioned_docs/version-3.8/data-modeling.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ Depending on the characteristics of your data and its access patterns, there are
111111

112112
A simple way to store data in an asset is to always store the latest state of the data in its entirety. However, this approach is sometimes inefficient from a storage cost perspective because, if a small part of the data is updated frequently, almost all the parts of the data are stored as duplicates in the asset records.
113113

114-
In such a case, you can choose to put only the differential data when updating the asset and merge all the asset records when you want to get the whole image of the latest data. Although this approach is efficient from a storage cost perspective, it affects query performance since it requires scanning all asset records. To limit the affects of this trade-off, creating a snapshot at some point in time is also an option so that you do not have to scan all asset records every time. [The generic contracts for collection authenticity management](./use-generic-contracts.mdx#manage-collection-authenticity) follow this design pattern.
114+
In such a case, you can choose to put only the differential data when updating the asset and merge all the asset records when you want to get the whole image of the latest data. Although this approach is efficient from a storage cost perspective, it affects query performance since it requires scanning all asset records. To limit the affects of this trade-off, creating a snapshot at some point in time is also an option so that you do not have to scan all asset records every time.

versioned_docs/version-3.8/getting-started.mdx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This getting started tutorial explains how to configure ScalarDL on your preferr
1515

1616
## Prerequisites
1717

18-
- One of the following Java Development Kits (JDKs)
18+
- One of the following Java Development Kits (JDKs):
1919
- **[Oracle JDK](https://www.oracle.com/java/):** 8, 11, 17, or 21 (LTS versions)
2020
- **[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)
2121
- [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
@@ -178,7 +178,7 @@ Select your database, and follow the instructions to deploy ScalarDL Ledger with
178178

179179
## Download the Client SDK
180180

181-
Next, you'll use the ScalarDL client tools and samples in the `scalardl-java-client-sdk` repository to interact with ScalarDL.
181+
Next, you'll use the ScalarDL client tools and samples in the [`scalardl-java-client-sdk`](https://github.com/scalar-labs/scalardl-java-client-sdk) repository to interact with ScalarDL.
182182

183183
Specify a version that is the same as the deployed ScalarDL version and is used for downloading the tools by running the following command:
184184

@@ -329,25 +329,16 @@ Briefly speaking, if only ScalarDL Ledger is used, the validation traverses asse
329329
With ScalarDL Ledger and Auditor, the validation checks discrepancies (i.e., Byzantine faults) between the states of Ledger and Auditor without centralized coordination.
330330
Please read [Getting Started with ScalarDL Auditor](getting-started-auditor.mdx) for more details about the validation with Auditor.
331331

332-
## Create your own contracts or use generic contracts
333-
334-
There are two options for preparing contracts: creating your own or using predefined ones.
332+
## Create your own contracts
335333

336334
As explained above, what you need to do to create your contracts is to extend the predefined base contract classes and override the `invoke` method as you like. For details, see [A Guide on How to Write a Good Contract](how-to-write-contract.mdx).
337335

338-
Predefined ones are called generic contracts and provide basic functionalities for common use cases. For details, see [Use Generic Contracts and Functions](use-generic-contracts.mdx).
339-
340336
## See also
341337

342338
To write your own contracts, see the following:
343339

344340
* [A Guide on How to Write a Good Contract](how-to-write-contract.mdx)
345341

346-
To use generic contracts, see the following:
347-
348-
* [Use Generic Contracts and Functions](use-generic-contracts.mdx)
349-
* [Generic Contracts and Functions Reference Guide](generic-contracts-reference.mdx)
350-
351342
To interact with ScalarDL components in your Java applications, see the following:
352343

353344
* [Write a ScalarDL Application in Java](how-to-write-applications.mdx)

versioned_docs/version-3.8/how-to-write-applications.mdx

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This document explains how to write ScalarDL applications. You will learn how to
1212

1313
## Use the ScalarDL Client SDK
1414

15-
You have two options to interact with ScalarDL: using commands as shown in the [getting started guide](getting-started.mdx) or using the [Java Client SDK](scalardl-java-client-sdk/README.mdx).
15+
You have two options to interact with ScalarDL: using [commands](scalardl-command-reference.mdx) as shown in the [getting started guide](getting-started.mdx) or using the [Java Client SDK](https://github.com/scalar-labs/scalardl-java-client-sdk).
1616
Using commands is convenient because you don't need to write applications. However, they invoke a process for each execution, which is slow, so they are mainly for quickly testing your contracts. Instead, using the Client SDK is usually recommended when you write ScalarDL-based applications because it is more efficient.
1717

1818
The Client SDK is available on [Maven Central](https://search.maven.org/search?q=a:scalardl-java-client-sdk). You can install it in your application by using a build tool such as Gradle. For example in Gradle, you can add the following dependency to `build.gradle`, replacing `VERSION` with the version of ScalarDL that you want to use.
@@ -53,7 +53,7 @@ For more information, please take a look at [Javadoc](https://javadoc.io/doc/com
5353

5454
## Handle errors
5555

56-
If an error occurs in your application, the Client SDK will return an exception with a status code and an error message with an error code. You should check the status code and the error code to identify the cause of the error.
56+
If an error occurs in your application, the Client SDK will return an exception with a status code. You should check the status code to identify the cause of the error.
5757

5858
### Implement error handling
5959

@@ -85,15 +85,6 @@ Status codes explain what kind of status request you ended up with. The status c
8585

8686
For more details, see <JavadocLink packageName="scalardl-common" path="com/scalar/dl/ledger/service" className="StatusCode" />.
8787

88-
### Error codes
89-
90-
Error codes explain more details about an error that a request encountered. For details about error codes, see the following:
91-
92-
- [ScalarDL Client Error Codes](scalardl-client-status-codes.mdx)
93-
- [ScalarDL Ledger Error Codes](scalardl-ledger-status-codes.mdx)
94-
- [ScalarDL Auditor Error Codes](scalardl-auditor-status-codes.mdx)
95-
- [ScalarDL Common Error Codes](scalardl-common-status-codes.mdx)
96-
9788
## Validate your data
9889

9990
In ScalarDL, you occasionally need to validate your data to make sure all the data is in a valid state. A valid state varies depending on how you set up and configure ScalarDL.
@@ -134,15 +125,15 @@ Asset Proof in ScalarDL is a set of information about an asset record and used a
134125
135126
#### Benefits of Asset Proof
136127
137-
Since Asset Proof is evidence at the time of execution by Ledger, it is difficult for Ledger to tamper data after the evidence is created because the proofs and Ledger states would be diverged. Thus, making use of Asset Proof appropriately could reduce the risk of data tampering.
128+
Since Asset Proof is evidence at the time of execution by Ledger, it is difficult for Ledger to tamper data after the evidence is created because the Asset Proofs and Ledger states would be diverged. Thus, making use of Asset Proof appropriately could reduce the risk of data tampering.
138129
139130
#### How to access Asset Proof from your applications
140131
141-
You can get <JavadocLink packageName="scalardl-common" path="com/scalar/dl/ledger/asset" className="AssetProof" /> from the result <JavadocLink packageName="scalardl-common" path="com/scalar/dl/ledger/model" className="ContractExecutionResult" /> of the `executeContract` method of the Client SDK. A proof can be validated if it is not tampered and it is from Ledger by verifying the signature.
132+
You can get <JavadocLink packageName="scalardl-common" path="com/scalar/dl/ledger/asset" className="AssetProof" /> from the result <JavadocLink packageName="scalardl-common" path="com/scalar/dl/ledger/model" className="ContractExecutionResult" /> of the `executeContract` method of the Client SDK. An Asset Proof can be validated if it is not tampered and it is from Ledger by verifying the signature.
142133
143-
Storing proofs outside of a domain in which Ledger runs is recommended. This is so that malicious activities in one domain can be detected by the other domain. Storing proofs in cloud storages for ease of management is also worth considering.
134+
Storing Asset Proofs outside of a domain in which Ledger runs is recommended. This is so that malicious activities in one domain can be detected by the other domain. Storing Asset Proofs in cloud storages for ease of management is also worth considering.
144135
145-
The proofs obtained in execution can be used when you do `validateLedger`. `validateLedger` also returns the proof of a specified asset record after doing Ledger-side validation. Then, the client can check if the proof is the same as the one that was previously returned from Ledger.
136+
The Asset Proofs obtained in execution can be used when you do `validateLedger`. `validateLedger` also returns the Asset Proof of a specified asset record after doing Ledger-side validation. Then, the client can check if the Asset Proof is the same as the one that was previously returned from Ledger.
146137
147138
## Use other languages
148139

versioned_docs/version-3.8/scalardl-java-client-sdk/README.mdx

Lines changed: 0 additions & 31 deletions
This file was deleted.

versioned_docs/version-3.8/sdks.mdx

Lines changed: 0 additions & 11 deletions
This file was deleted.

versioned_sidebars/version-3.8-sidebars.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@
3838
"label": "Develop",
3939
"collapsible": true,
4040
"items": [
41-
{
42-
"type": "category",
43-
"label": "SDKs",
44-
"collapsible": true,
45-
"items": [
46-
"scalardl-java-client-sdk/README"
47-
]
48-
},
4941
"getting-started-auditor",
5042
"data-modeling",
5143
"how-to-write-applications",

0 commit comments

Comments
 (0)