-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extended sdk-nestjs docs + cleanup #752
Conversation
@@ -88,7 +88,7 @@ Then it's serialized form (step 5 is omitted in this example) is as follows: | |||
|
|||
## **Ed25519 signature** | |||
|
|||
MultiversX uses the [Ed25519](https://ed25519.cr.yp.to/) algorithm to sign transactions. In order to obtain the signature, one can use generic software libraries such as [PyNaCl](https://pynacl.readthedocs.io/en/stable/signing/), [tweetnacl-js](https://github.com/dchest/tweetnacl-js#signatures) or components of MultiversX SDK such as [mx-sdk-js-wallet](https://github.com/multiversx/mx-sdk-js-wallet), [mx-sdk-py-wallet](https://github.com/multiversx/mx-sdk-py-wallet), [erdgo](https://github.com/multiversx/mx-sdk-erdgo), [erdjava](https://github.com/multiversx/mx-sdk-erdjava), [mx-sdk-js-wallet-cli](https://github.com/multiversx/mx-sdk-js-wallet-cli) etc. | |||
MultiversX uses the [Ed25519](https://ed25519.cr.yp.to/) algorithm to sign transactions. In order to obtain the signature, one can use generic software libraries such as [PyNaCl](https://pynacl.readthedocs.io/en/stable/signing/), [tweetnacl-js](https://github.com/dchest/tweetnacl-js#signatures) or components of MultiversX SDK such as [mx-sdk-js-wallet](https://github.com/multiversx/mx-sdk-js-wallet), [mx-sdk-py-wallet](https://github.com/multiversx/mx-sdk-py-wallet), [sdk-go](https://github.com/multiversx/mx-sdk-go), [mxjava](https://github.com/multiversx/mx-sdk-java), [mx-sdk-js-wallet-cli](https://github.com/multiversx/mx-sdk-js-wallet-cli) etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
- programmatically, using the [erdgo - Golang SDK](/sdk-and-tools/erdgo) | ||
- programmatically, using the [erdjava - Java SDK](/sdk-and-tools/erdjava) | ||
- programmatically, using the [sdk-go - Golang SDK](/sdk-and-tools/sdk-go) | ||
- programmatically, using the [mxjava - Java SDK](/sdk-and-tools/mxjava) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this context, can be sdk-java
(the label - the link is OK).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
docs/sdk-and-tools/overview.md
Outdated
|
||
[comment]: # (mx-context-auto) | ||
|
||
### erdjava - Java SDK | ||
### mxjava - Java SDK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, not mx-sdk-java
(for consistency)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
[comment]: # (mx-context-auto) | ||
|
||
## Utility | ||
The package exports **in memory cache service** and **remote cache service**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... two services: an in-memory ... and a remote ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
[comment]: # (mx-context-auto) | ||
|
||
## Table of contents | ||
- [In Memory Cache](#in-memory-cache) - super fast in memory caching system based on [LRU cache](https://www.npmjs.com/package/lru-cache) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in-memory
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
## In memory cache | ||
In memory cache, available through `InMemoryCacheService`, is used to read and write data from and into the memory storage of your Node.js instance. | ||
|
||
*Note that if you have multiple instances of your application you must sync local cache across all your instances.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the local cache
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
*Note that if you have multiple instances of your application you must sync local cache across all your instances.* | ||
|
||
Let's take as an example a ConfigService that loads some non-crucial configuration from the database and can be cached for 10 seconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ConfigService
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
[comment]: # (mx-context-auto) | ||
|
||
## Redis Cache | ||
Redis cache, available through `RedisCacheService`, is a caching system build ontop of Redis. It is used to share cache related information among multiple microservices. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"to share cache related information" -> "used as a shared cache, shared among ..." (without "cache related information").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
[comment]: # (mx-context-auto) | ||
|
||
## Interceptors | ||
The package provides a series of [Nestjs Interceptors](https://docs.nestjs.com/interceptors) which will automatically log and set the CPU and overall duration for each request in a prom histogram ready to be scrapped by Prometheus. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_prom_
or Prometheus histogram
, plus a link to Prometheus?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
## MetricsModule and MetricsService | ||
|
||
`MetricsModule` is a [Nestjs Module](https://docs.nestjs.com/modules) responsible for aggregating metrics data through `MetricsService` and exposing them to be consumed by Prometheus. `MetricsService` is extensible, you can define and aggregate your own metrics and expose them. By default it exposes a set of metrics created by the interceptors specified [here](#interceptors). Most of the Multiversx packages expose metrics by default through this service. For example [@multiversx/sdk-nestjs-redis](https://www.npmjs.com/package/@multiversx/sdk-nestjs-redis) automatically tracks the execution time of each redis query, overall redis health and much more, by leveraging the `MetricsService`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Most of the Multiversx packages" -> typo X.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
de4d91d
# Conflicts: # docs/developers/meta/sc-meta-cli.md
Description of the pull request (what is new / what has changed)
Extended NestJS SDK docs + rebranding + code cleanup
Did you test the changes locally ?
Which category (categories) does this pull request belong to?