Installation and Important Information
Installation
To run WooriDB it is necessary to have Rust installed in the machine. There are two ways to do this:
- Go to rustup.rs and copy the command there, for unix it is
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh. - Clone WooriDB and execute
make setup.
Executing WooriDB
Release mode performance:make releasein project root for performance optimization.Release mode size:make runin project root for size optimization.Debug mode:make debugin project root.
Docker
You can find the latest docker image at naomijub/wooridb. Currently the most stable tag is beta-8. To execute the docker container run:
docker run -p 1438:1438 naomijubs/wooridb:beta-8 debugfor debug mode.docker run -p 1438:1438 -e AUTH_HASHING_COST=8 -e ADMIN=your-admin-id -e ADMIN_PASSWORD=your-admin-pswd naomijubs/wooridb:beta-8 runfor size optimization.docker run -p 1438:1438 -e AUTH_HASHING_COST=8 -e ADMIN=your-admin-id -e ADMIN_PASSWORD=your-admin-pswd naomijubs/wooridb:beta-8 releasefor performance optimization.- All
-e/--envcan be replaced by a--env-file path/to/your/.env. Your.envfile should contain the following fields:
HASHING_COST=16
PORT=1438
SESSION_EXPIRATION_TIME=3600
MAX_CONNECTIONS=1000
CLIENT_SHUTDOWN=5000
AUTH_HASHING_COST=8
ADMIN=your-admin-id
ADMIN_PASSWORD=your-admin-pswd
Important Information
- Responses are in
RONformat. BLOBwill not be supported. Check out To BLOB or Not To BLOB: Large Object Storage in a Database or a Filesystem.
Configurations
- To run the project in
debugmode it is important to export the following environment variablesHASHING_COST, PORT, MAX_CONNECTIONS, CLIENT_SHUTDOWN. Default values are:
HASHING_COST=16
PORT=1438
MAX_CONNECTIONS=1000
CLIENT_SHUTDOWN=5000
MAX_CONNECTIONSis the maximum number of connections supported simultaneously.CLIENT_SHUTDOWNis the time to drop a client's connection, use 0 to disable it.- To run the project in
releasemode it is important to export the following environment variablesHASHING_COST, PORT, MAX_CONNECTIONS, CLIENT_SHUTDOWN, AUTH_HASHING_COST, ADMIN, ADMIN_PASSWORD, SESSION_EXPIRATION_TIME. There are no default values forAUTH_HASHING_COST, ADMIN, ADMIN_PASSWORD, SESSION_EXPIRATION_TIME.