Skip to content

Commit abc7ce3

Browse files
AUTO: Docs repo sync - ScalarDL (#749)
* 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 0d9db16 commit abc7ce3

File tree

6 files changed

+9
-83
lines changed

6 files changed

+9
-83
lines changed

versioned_docs/version-3.9/data-modeling.mdx

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

113113
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.
114114

115-
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.
115+
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.9/getting-started.mdx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ Select your database, and follow the instructions to deploy ScalarDL Ledger with
179179

180180
## Download the Client SDK
181181

182-
Next, you'll use the ScalarDL client tools and samples in the `scalardl-java-client-sdk` repository to interact with ScalarDL.
182+
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.
183183

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

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

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

337335
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).
338336

339-
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).
340-
341337
## See also
342338

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

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

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

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

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

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

1414
## Use the ScalarDL Client SDK
1515

16-
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](scalardl-java-client-sdk/README.mdx).
16+
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).
1717
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.
1818

1919
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.
@@ -54,7 +54,7 @@ For more information, please take a look at [Javadoc](https://javadoc.io/doc/com
5454

5555
## Handle errors
5656

57-
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.
57+
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.
5858

5959
### Implement error handling
6060

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

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

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

10091
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.
@@ -135,15 +126,15 @@ Asset Proof in ScalarDL is a set of information about an asset record and used a
135126
136127
#### Benefits of Asset Proof
137128
138-
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.
129+
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.
139130
140131
#### How to access Asset Proof from your applications
141132
142-
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.
133+
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.
143134
144-
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.
135+
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.
145136
146-
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.
137+
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.
147138
148139
## Use other languages
149140

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

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

versioned_docs/version-3.9/sdks.mdx

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

versioned_sidebars/version-3.9-sidebars.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,6 @@
7171
"label": "Develop",
7272
"collapsible": true,
7373
"items": [
74-
{
75-
"type": "category",
76-
"label": "SDKs",
77-
"collapsible": true,
78-
"items": [
79-
{
80-
"type": "doc",
81-
"id": "scalardl-java-client-sdk/README",
82-
"label": "ScalarDL Java Client SDK"
83-
}
84-
]
85-
},
8674
{
8775
"type": "doc",
8876
"id": "getting-started-auditor",

0 commit comments

Comments
 (0)