diff --git a/docs/building.md b/docs/building.md index fd046ab..af4be12 100644 --- a/docs/building.md +++ b/docs/building.md @@ -1,6 +1,13 @@ # Building [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 ### Linux @@ -69,11 +76,12 @@ cmake -DMULTI_THREADING=false .. ``` with `-D` -### Lastly +### Finishing building +lastly type in ``` cmake .. make -j ``` -### 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**. +## Certs +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**. diff --git a/docs/connected_services/how_to/APIs.md b/docs/connected_services/how_to/APIs.md index 039b8fa..5a9ca5c 100644 --- a/docs/connected_services/how_to/APIs.md +++ b/docs/connected_services/how_to/APIs.md @@ -1,4 +1,5 @@ [PREVIOUS PAGE](explanation.md) | [NEXT PAGE](endpoints.md) -| language | -| -------- | +| language | v1 | +| -------------------------------------------------------------- | :----------------: | +| [Python](https://github.com/FearlessDoggo21/CCashPythonClient) | :heavy_check_mark: | \ No newline at end of file diff --git a/docs/connected_services/how_to/endpoints.md b/docs/connected_services/how_to/endpoints.md index 6d1a3df..d988267 100644 --- a/docs/connected_services/how_to/endpoints.md +++ b/docs/connected_services/how_to/endpoints.md @@ -14,10 +14,16 @@ :heavy_multiplication_x: ### Usage endpoints -| 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: | -| 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: | +| 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: | +| 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 `v` denoting the API version diff --git a/docs/contributors.md b/docs/contributors.md index bfcc050..0d2e7f1 100644 --- a/docs/contributors.md +++ b/docs/contributors.md @@ -1,8 +1,8 @@ # Contributors -| name | work | -| :------------------------------------------ | ----------------------- | -| Caesay | Restful API suggestions | -| [Luke](https://github.com/LukeeeeBennett) | Docker package | -| [React](https://github.com/Reactified) | logo | -| [Expand](https://github.com/Expand-sys) | fixed docker package | -| [Doggo](https://github.com/FearlessDoggo21) | Logs optimized | \ No newline at end of file +| name | work | +| :------------------------------------------ | -------------------------- | +| Caesay | Restful API suggestions | +| [Luke](https://github.com/LukeeeeBennett) | Docker package | +| [React](https://github.com/Reactified) | logo | +| [Expand](https://github.com/Expand-sys) | fixed docker package | +| [Doggo](https://github.com/FearlessDoggo21) | Logs optimized, Python API | \ No newline at end of file diff --git a/docs/features/implementation.md b/docs/features/implementation.md index 4f7ac12..e61feb4 100644 --- a/docs/features/implementation.md +++ b/docs/features/implementation.md @@ -7,9 +7,10 @@ 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) -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 ## base64 +## simdjson ## drogon webframework ## multi-threading support ## intelligent saving diff --git a/docs/idea.md b/docs/idea.md index bc03362..eee9674 100644 --- a/docs/idea.md +++ b/docs/idea.md @@ -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. -**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`**