📚🚧 docs

This commit is contained in:
EntireTwix 2021-07-09 15:24:00 -07:00
parent 7803c5e1e5
commit 39fb5e96a1
6 changed files with 34 additions and 18 deletions

View file

@ -1,6 +1,13 @@
# Building # Building
[PREVIOUS PAGE](features/implementation.md) | [NEXT PAGE](FAQ.md) [PREVIOUS PAGE](features/implementation.md) | [NEXT PAGE](FAQ.md)
## System Requirements
as CCash is very lightweight it can run on practically any device but here are some tips:
* single core machines should toggle `MULTI_THREADED` to `false`
* if your server is sufficiently active as so that each save freqeuncy saving is highly likely then `CONSERVATIVE_DISK_SAVE` should be toggled to `false`
* `MAX_LOG_SIZE` should be adjusted as it takes up the most memory usage/storage at about 173 bytes in memory and (size) in disk space per log. Setting to 0 will not even compile logs
* with no users memory usage is 8.792517 Mb
## Drogon Depedencies ## Drogon Depedencies
### Linux ### Linux
@ -69,11 +76,12 @@ cmake -DMULTI_THREADING=false ..
``` ```
with `-D` with `-D`
### Lastly ### Finishing building
lastly type in
``` ```
cmake <flags of your choice or none> .. cmake <flags of your choice or none> ..
make -j<threads> make -j<threads>
``` ```
### Certs ## Certs
make sure to edit `config.json` adding the certificate location if you're using HTTPS, I personally use certbot, **it is Highly recommened you secure your server**. make sure to edit `config.json` adding the certificate location if you're using HTTPS, I personally use [certbot](https://certbot.eff.org/), **it is Highly recommened you secure your server**.

View file

@ -1,4 +1,5 @@
[PREVIOUS PAGE](explanation.md) | [NEXT PAGE](endpoints.md) [PREVIOUS PAGE](explanation.md) | [NEXT PAGE](endpoints.md)
| language | | language | v1 |
| -------- | | -------------------------------------------------------------- | :----------------: |
| [Python](https://github.com/FearlessDoggo21/CCashPythonClient) | :heavy_check_mark: |

View file

@ -14,10 +14,16 @@
:heavy_multiplication_x: :heavy_multiplication_x:
### Usage endpoints ### Usage endpoints
| name | purpose | json input | path | HTTP Method | return type | return value | Jresp | Jreq | A | U | | name | purpose | json input | path | HTTP Method | return type | return value | Jresp | Jreq | A | U |
| :----- | ------------------------------------------------------------------------- | ---------- | --------------------------------- | :---------: | :------------: | :--------------------------------------------: | :----------------: | :----------------------: | :----------------------: | :----------------------: | | :----- | ------------------------------------------------------------------------- | ---------- | --------------------------------- | :---------: | :------------: | :------------------------------------------: | :----------------: | :----------------------: | :----------------------: | :----------------------: |
| GetBal | retrieving the balance of a given user, `{name}` | `N/A` | `api/v1/user/balance?name={name}` | `GET` | uint32 | the user's balance | :heavy_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | | GetBal | retrieving the balance of a given user, `{name}` | `N/A` | `api/v1/user/balance?name={name}` | `GET` | uint32 | the user's balance | :heavy_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |
| GetLog | retrieves the logs of a given user, length varies by server configuration | `N/A` | `api/v1/user/log` | `GET` | array of jsons | `{"to":string, "amount":uint32, "time":int64}` | :heavy_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | | GetLog | retrieves the logs of a given user, length varies by server configuration | `N/A` | `api/v1/user/log` | `GET` | array of jsons | {"to":string, "amount":uint32, "time":int64} | :heavy_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_check_mark: |
### Usage enpoints errors
| name | 400 | 401 | 404 | 406 |
| :----- | :----------------------: | :----------------------: | :----------------: | :----------------: |
| GetBal | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_check_mark: | :heavy_check_mark: |
| GetLog | :heavy_multiplication_x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
### Usage endpoints support ### Usage endpoints support
`v` denoting the API version `v` denoting the API version

View file

@ -1,8 +1,8 @@
# Contributors # Contributors
| name | work | | name | work |
| :------------------------------------------ | ----------------------- | | :------------------------------------------ | -------------------------- |
| Caesay | Restful API suggestions | | Caesay | Restful API suggestions |
| [Luke](https://github.com/LukeeeeBennett) | Docker package | | [Luke](https://github.com/LukeeeeBennett) | Docker package |
| [React](https://github.com/Reactified) | logo | | [React](https://github.com/Reactified) | logo |
| [Expand](https://github.com/Expand-sys) | fixed docker package | | [Expand](https://github.com/Expand-sys) | fixed docker package |
| [Doggo](https://github.com/FearlessDoggo21) | Logs optimized | | [Doggo](https://github.com/FearlessDoggo21) | Logs optimized, Python API |

View file

@ -7,9 +7,10 @@
<!-- https://greg7mdp.github.io/parallel-hashmap/ --> <!-- https://greg7mdp.github.io/parallel-hashmap/ -->
below is `GetBal()` being called where `x` axis grows with # of users reaching 10 million users, `y` axis is time in ns. The name given is random between 0 and max users at that time as to provide more accurate results below is `GetBal()` being called where `x` axis grows with # of users reaching 10 million users, `y` axis is time in ns. The name given is random between 0 and max users at that time as to provide more accurate results
![image](GetBal().png) ![image](GetBal().png)
as the graph demonstrates, regardless of size GetBal remains consistent at around 50ns on my 3700x. as the graph demonstrates, regardless of size GetBal remains consistent at around 39ns on my 3700x.
## xxHash ## xxHash
## base64 ## base64
## simdjson
## drogon webframework ## drogon webframework
## multi-threading support ## multi-threading support
## intelligent saving ## intelligent saving

View file

@ -22,4 +22,4 @@ or on localhost:
running it local to the minecraft server reduces latency for ComputerCraft connected services, fortunately CCash is sufficiently lightweight as to not impact performance on most setups. running it local to the minecraft server reduces latency for ComputerCraft connected services, fortunately CCash is sufficiently lightweight as to not impact performance on most setups.
**DISCLAIMER: if you are to run it locally and want to use ComputerCraft with it, make sure to add `127.0.0.1` to ComputerCraft's config section `allowed_domains`** \ **DISCLAIMER: if you are to run it locally and want to use ComputerCraft with it, make sure to add `127.0.0.1` to ComputerCraft's config section `allowed_domains`**