// Compressed data node :D
The goal of this project is to make a db-like local storage system for files.
It's therefore not meant to be user-facing.
-
Backend
It works well.
Streaming compression and decompression makes it really fast and memory-efficientCould really use a dashboard system
-
Front-end
Uses streaming for upload so it's fast
A good front-end design is still needed but not required () But it works
- The actual server
- Web server that we can upload files to
- Web server that we can download files from
- Streaming upload, download and compression
- Integration with curl #6
- Simple download link #7
- A way to not store duplicates using hash-based duplicate detection
The implementation isn't the prettyest nor the safest but it works
(I'll rework it soon™) - A way to delete a stored file (see #3)
- WASM front end
- Homepage
- Upload
About input file size, I've set 1Gib, but it's easy to modify
(See default.limit.file in Rocket.toml)
git clone https://github.com/bowarc/storage_server
cd ./storage_serversh scripts/docker_build.shUse host network and link a docker volume named 'storage_server' that points to the server's storage cache
docker run -d --network host -v storage_server:/app/cache storage_server:latest git clone https://github.com/bowarc/storage_server
cd ./storage_serverIn each build script ./scripts/build*, you can specify the command line argument r or release to build the project in release mode
This will enable some optimisations but make the compilation a bit slower.
Start by running sh scripts/init.sh
This will create some important folders in the project directory, which the server relies on.
sh scripts/build_back.sh
sh scripts/build_front.sh
sh scripts/build.sh
To run the server, use sh scripts/run.sh
Check the examples directory for one using python (make sure the server is running and you generated the sample file before running the example)
Any programming language able to make local web request could use it, here is an example using curl
curl --upload_file ./file.ext http://<YOUR_ADDRESS:YOUR_PORT>/This yields back an uuid that is used by the server to identify that file
curl http://<YOUR_ADDRESS:YOUR_PORT>/<UUID>/file.ext -Ocurl http://<YOUR_ADDRESS:YOUR_PORT>/<UUID> -X DELETENOTE: On browser you only need the UUID as it auto redirects to the right file name
(http://<YOUR_ADDRESS:YOUR_PORT>/<UUID>->http://<YOUR_ADDRESS:YOUR_PORT>/<UUID>/file.ext).
Take a look at #7 for more informations.