Skip to content

Commit 9b850e7

Browse files
Documentation for storages
Signed-off-by: Alexandros Filios <[email protected]>
1 parent be9d1d6 commit 9b850e7

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

docs/services/storage.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
11
# Storage
22

3+
For an introduction into the concepts of Database, Persistence, Driver, Store, read [this documentation](https://github.com/hyperledger-labs/fabric-smart-client/blob/main/docs/db-driver.md).
4+
5+
The project utilizes the following layers of abstraction on top of the database layer:
6+
* `Store`: executes the SQL queries. A `Store` is only used from within the `StoreService` of the same kind.
7+
* `StoreService`: extends the `Store` (of the same kind) by adding extra functionality (e.g. keeping maps, cache, or combining functionalities of the underlying store). A `StoreService` does not have any other dependency, but the `Store`.
8+
* `Service`: combines `StoreService` and `Service` instances to provide more complete functionality that can be used by the application.
9+
Each domain has a `Store`, a `StoreService` and potentially a `Service`.
10+
311
The Fabric Token SDK utilizes a robust data management system to ensure the secure and reliable tracking of all token-related activities.
4-
This system leverages several databases, each with a specific purpose:
12+
This system leverages several stores, each with a specific purpose:
513

6-
* **Transaction Database (`ttxdb`)**:
7-
This critical database serves as the central repository for all transaction records.
14+
* **Transaction Store (`ttxdb`)**:
15+
This critical store serves as the central repository for all transaction records.
816
It captures every token issuance, transfer, or redemption, providing a complete historical record of token activity within the network.
9-
The `ttxdb` service is locate under [`token/services/ttxdb`](./../../token/services/ttxdb). It is accessible via the `ttx` service.
17+
The `ttxdb.StoreService` store is located under [`token/services/ttxdb`](./../../token/services/ttxdb). It is accessible via the `ttx.Service`.
1018

11-
* **Token Database (`tokendb`)**:
19+
* **Token Store (`tokendb`)**:
1220
The `tokendb` acts as the registry for all tokens within the system.
1321
It stores detailed information about each token, including its unique identifier, denomination type (think currency or unique identifier), current ownership, and total quantity in circulation.
1422
By referencing the `tokendb`, developers and network participants can obtain a clear picture of the token landscape.
15-
The `tokendb` is used by the `Token Selector`, to select the tokens to use in each transaction, and by the `Token Vault Service` to provide its services.
16-
The `tokendb` service is locate under [`token/services/tokendb`](./../../token/services/tokendb). It is accessible via the `tokens` service.
23+
The `tokendb.StoreService` is used by the `Token Selector`, to select the tokens to use in each transaction, and by the `Token Vault Service` to provide its services.
24+
The `tokendb.StoreService` service is located under [`token/services/tokendb`](./../../token/services/tokendb). It is accessible via the `tokens.Service`.
1725

18-
* **Audit Database (`auditdb`)** (if applicable):
26+
* **Audit Store (`auditdb`)** (if applicable):
1927
For applications requiring enhanced auditability, the `auditdb` provides an additional layer of transparency.
2028
It meticulously stores audit records for transactions that have undergone the auditing process.
2129
This functionality is particularly valuable for scenarios where regulatory compliance or tamper-proof records are essential.
22-
The `auditdb` service is locate under [`token/services/auditdb`](./../../token/services/auditdb). It is accessible via the `auditor` service.
30+
The `auditdb.StoreService` is located under [`token/services/auditdb`](./../../token/services/auditdb). It is accessible via the `auditor.Service`.
2331

24-
* **Identity Database (`identitydb`)**:
32+
* **Identity Store (`identitydb`) and Wallet Store (`walletdb`)**:
2533
The `identitydb` plays a crucial role in managing user identities and wallets within the network.
2634
It securely stores wallet configurations, identity-related audit information, and so on, enabling secure interactions with the token system.
27-
The `identitydb` service is locate under [`token/services/identitydb`](./../../token/services/identitydb).
35+
The `identitydb.StoreService` is located under [`token/services/identitydb`](./../../token/services/identitydb).
2836
It is used by the `identity` service via its interfaces. Please, refer to the [`identity service`](identity.md) for more information about the storage part.
2937

3038
## Configuration

0 commit comments

Comments
 (0)